From f6b2e7bd8da1fc8cf2ec3a24caa787fbed5f155c Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 26 Aug 2005 11:48:04 +0000 Subject: [PATCH] b=7390 - enable audit on every child in dir while setting audit on that dir. --- lustre/utils/lctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index a1f4d3f..7d01120 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -125,7 +125,7 @@ static int set_dir_audit(char * dir, __u64 mask) !strcmp(ent->d_name, "..")) continue; //open file/dir - sprintf(buf, "%s%s", dir, ent->d_name); + sprintf(buf, "%s/%s\0", dir, ent->d_name); //printf("set audit on %s\n", buf); fd = open(buf, O_RDONLY); @@ -182,12 +182,12 @@ static int set_audit(int argc, char **argv, int fs) //audit for fs? if (fs) SET_AUDIT_OP(mask, AUDIT_FS); - /*else { + else { //if dir then set audit for childs also if (S_ISDIR(st.st_mode)) { rc = set_dir_audit(argv[3], mask); } - }*/ + } //set audit for file/dir itself rc = ioctl(fd, LL_IOC_AUDIT, mask); close(fd); -- 1.8.3.1