From 99eb7c451c912a460db4276ed253ffd0da5dcc4a Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 8 Dec 2009 18:44:45 +0100 Subject: [PATCH] util_unlink_secure(): chmod() before chown() --- libudev/libudev-util-private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5