Whamcloud - gitweb
fix for namelen used for audit purposes.
authortappro <tappro>
Thu, 25 Aug 2005 12:58:02 +0000 (12:58 +0000)
committertappro <tappro>
Thu, 25 Aug 2005 12:58:02 +0000 (12:58 +0000)
lustre/mds/handler.c
lustre/mds/mds_audit.c
lustre/mds/mds_open.c

index 103abed..e952fc5 100644 (file)
@@ -1544,7 +1544,7 @@ static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
         if (rc) {
                 if (child_lockh->cookie == 0)
                         mds_audit_auth(req, &uc, AUDIT_STAT, &body->id1, 
-                                       name, namesize);
+                                       name, namesize - 1);
                 GOTO(cleanup, rc);
         }
 
@@ -1706,7 +1706,7 @@ static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
                 } else {
                         au_inode = dparent->d_inode;
                         mds_audit_stat(req, &body->id1, au_inode,
-                                       name, namesize, rc);
+                                       name, namesize - 1, rc);
                 }
         }
         switch (cleanup_phase) {
index 243d96d..696132a 100644 (file)
@@ -203,7 +203,7 @@ int mds_audit_reint(struct ptlrpc_request *req,
         }
         
         rc = mds_audit_auth(req, &rec->ur_uc, code, rec->ur_id1,  
-                            rec->ur_name, rec->ur_namelen);
+                            rec->ur_name, rec->ur_namelen - 1);
         return rc;
 }
 
index 31b7beb..482ef7c 100644 (file)
@@ -1463,7 +1463,7 @@ cleanup_no_trans:
                                 au_inode = dparent->d_inode;
                                 au_id = *(rec->ur_id1);
                                 mds_audit_open(req, &au_id, au_inode, 
-                                               rec->ur_name, rec->ur_namelen,
+                                               rec->ur_name, rec->ur_namelen - 1,
                                                rc);
                         } else {
                                 if (fid == 0)