diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-30 12:35:13 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-30 12:35:13 +0100 |
commit | 06671bee8dbf4c5f7f633e3bd6ae7e5135cac0f1 (patch) | |
tree | 897e4e60a689b1e632c24d22a9ff7f5ecd2f4fbf /src/Daemon | |
parent | 8c2d2261cf50f7c65455846ec18feb6c7d4ad35e (diff) | |
download | abrt-06671bee8dbf4c5f7f633e3bd6ae7e5135cac0f1.tar.gz abrt-06671bee8dbf4c5f7f633e3bd6ae7e5135cac0f1.tar.xz abrt-06671bee8dbf4c5f7f633e3bd6ae7e5135cac0f1.zip |
fix incorrect logic for checking/correcting directory owner
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon')
-rw-r--r-- | src/Daemon/Daemon.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index c33806bb..9615ce8a 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -640,7 +640,7 @@ static void ensure_root_writable_dir(const char *dir) perror_msg_and_die("Can't create '%s'", dir); if (stat(dir, &sb) != 0 || !S_ISDIR(sb.st_mode)) error_msg_and_die("'%s' is not a directory", dir); - if (sb.st_uid != 0 || sb.st_gid != 0 || chown(dir, 0, 0) != 0) + if ((sb.st_uid != 0 || sb.st_gid != 0) && chown(dir, 0, 0) != 0) perror_msg_and_die("Can't set owner 0:0 on '%s'", dir); /* We can't allow anyone to create dumps: otherwise users can flood * us with thousands of bogus or malicious dumps */ |