Skip to content

Commit

Permalink
fix mount hang if kernel 2.6.29 audit is enabled: we ignore mtab upda…
Browse files Browse the repository at this point in the history
…te error as mount(8)
  • Loading branch information
szaka committed Apr 1, 2009
1 parent fd8e63f commit a5c720e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions libfuse-lite/mount_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
const char *mnt, const char *type, const char *opts)
{
int res;
int status;

if (!mtab_needs_update(mnt))
return 0;

res = fork();
if (res == -1) {
fprintf(stderr, "%s: fork: %s\n", progname, strerror(errno));
return -1;
return 0;
}
if (res == 0) {
char templ[] = "/tmp/fusermountXXXXXX";
Expand Down Expand Up @@ -96,14 +95,6 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
strerror(errno));
exit(1);
}
res = waitpid(res, &status, 0);
if (res == -1) {
fprintf(stderr, "%s: waitpid: %s\n", progname, strerror(errno));
return -1;
}
if (status != 0)
return -1;

return 0;
}

Expand Down

0 comments on commit a5c720e

Please sign in to comment.