From: tappro Date: Fri, 26 Aug 2005 12:59:06 +0000 (+0000) Subject: b=7390 X-Git-Tag: 1.4.10~637 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ff23d2bd24d5adf6fa8b1ea6842c0119357c3e46;p=fs%2Flustre-release.git b=7390 previous fix was wrong --- diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index 7d01120..d6b1f24 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -124,16 +124,13 @@ static int set_dir_audit(char * dir, __u64 mask) if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) continue; - //open file/dir - sprintf(buf, "%s/%s\0", dir, ent->d_name); - //printf("set audit on %s\n", buf); - + + sprintf(buf, "%s/%s", dir, ent->d_name); + fd = open(buf, O_RDONLY); if (fd < 0) { fprintf(stderr, "can't open: %s: %s\n", buf, strerror(rc = errno)); - closedir(sdr); - free(buf); continue; } rc = ioctl(fd, LL_IOC_AUDIT, mask);