util_unlink_secure(): chmod() before chown()

This commit is contained in:
Kay Sievers 2009-12-08 18:44:45 +01:00
parent 7f4954d040
commit 99eb7c451c

View File

@ -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;