summaryrefslogtreecommitdiff
path: root/libudev/libudev-util-private.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-12-08 18:44:45 +0100
committerKay Sievers <kay.sievers@vrfy.org>2009-12-08 18:44:45 +0100
commit99eb7c451c912a460db4276ed253ffd0da5dcc4a (patch)
tree87ce1408dcb21056a3a51fbd5a31d6f62bd32579 /libudev/libudev-util-private.c
parent7f4954d04026f28b0ebe65a514f06fefad8efaca (diff)
util_unlink_secure(): chmod() before chown()
Diffstat (limited to 'libudev/libudev-util-private.c')
-rw-r--r--libudev/libudev-util-private.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c
index 5b3e337643..c05c157575 100644
--- a/libudev/libudev-util-private.c
+++ b/libudev/libudev-util-private.c
@@ -114,8 +114,8 @@ int util_unlink_secure(struct udev *udev, const char *filename)
{
int err;
- chmod(filename, 0000);
chown(filename, 0, 0);
+ chmod(filename, 0000);
err = unlink(filename);
if (errno == ENOENT)
err = 0;