From: Kay Sievers Date: Tue, 8 Dec 2009 17:44:45 +0000 (+0100) Subject: util_unlink_secure(): chmod() before chown() X-Git-Tag: 174~682 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99eb7c451c912a460db4276ed253ffd0da5dcc4a;p=systemd util_unlink_secure(): chmod() before chown() --- diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index 5b3e3376..c05c1575 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;