quilt refresh listed03-linux-only
[debian/tar] / gnu / unlinkdir.c
index 1473b3c41c676adb445949613fa8b700bc744b7c..fa0e1a4a85e1de94d90d07a0a09f02f9bcaa7f19 100644 (file)
@@ -2,7 +2,7 @@
 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 /* unlinkdir.c - determine whether we can unlink directories
 
-   Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 
 #include "unlinkdir.h"
 #include "priv-set.h"
+#include "root-uid.h"
 #include <unistd.h>
 
 #if ! UNLINK_CANNOT_UNLINK_DIR
@@ -45,7 +46,7 @@ cannot_unlink_dir (void)
       cannot = (priv_set_ismember (PRIV_SYS_LINKDIR) == 0);
 # else
       /* In traditional Unix, only root can unlink directories.  */
-      cannot = (geteuid () != 0);
+      cannot = (geteuid () != ROOT_UID);
 # endif
       initialized = true;
     }