X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fwrite-any-file.c;h=f6b574df6387701de82110fe962579ef9b66f2f4;hb=bc273a4c560ab92e410f33245de3fa711e38ab3c;hp=2a26b2fab4b889df3f23f78afaf6726e7df502d5;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/write-any-file.c b/lib/write-any-file.c index 2a26b2fab..f6b574df6 100644 --- a/lib/write-any-file.c +++ b/lib/write-any-file.c @@ -1,6 +1,6 @@ /* Determine whether we can write any file. - Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 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 @@ -21,6 +21,7 @@ #include "write-any-file.h" #include "priv-set.h" +#include "root-uid.h" #include @@ -40,7 +41,7 @@ can_write_any_file (void) can = (priv_set_ismember (PRIV_FILE_DAC_WRITE) == 1); #else /* In traditional Unix, only root can unlink directories. */ - can = (geteuid () == 0); + can = (geteuid () == ROOT_UID); #endif can_write = can; initialized = true;