mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Silenced warnings by gcc >= 4.8 about non-checked return values
Added tests on the value returned by setuid() to avoid warnings by gcc >= 4.8
This commit is contained in:
parent
5e18e97d0b
commit
2cbdba0c5c
@ -305,7 +305,9 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
|
||||
char templ[] = "/tmp/fusermountXXXXXX";
|
||||
char *tmp;
|
||||
|
||||
setuid(geteuid());
|
||||
if (setuid(geteuid()))
|
||||
fprintf(stderr, "%s: failed to setuid : %s\n", progname,
|
||||
strerror(errno));
|
||||
|
||||
/*
|
||||
* hide in a directory, where mount isn't able to resolve
|
||||
@ -351,7 +353,9 @@ int fuse_mnt_umount(const char *progname, const char *mnt, int lazy)
|
||||
return -1;
|
||||
}
|
||||
if (res == 0) {
|
||||
setuid(geteuid());
|
||||
if (setuid(geteuid()))
|
||||
fprintf(stderr, "%s: failed to setuid : %s\n", progname,
|
||||
strerror(errno));
|
||||
execl("/bin/umount", "/bin/umount", "-i", mnt, lazy ? "-l" : NULL,
|
||||
NULL);
|
||||
fprintf(stderr, "%s: failed to execute /bin/umount: %s\n", progname,
|
||||
|
Loading…
Reference in New Issue
Block a user