X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funlinkdir.c;h=24b84f1c96b0dbc9ff1083040ea7d19dacb91b3e;hb=f62a2da1390a78aebe7dcbc5753ba7a2b34cf1fd;hp=b3f6285e662fbc0dbb17a0a46bc21b8d92ba57e1;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/unlinkdir.c b/lib/unlinkdir.c index b3f6285e6..24b84f1c9 100644 --- a/lib/unlinkdir.c +++ b/lib/unlinkdir.c @@ -1,6 +1,6 @@ /* unlinkdir.c - determine whether we can unlink directories - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 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 "unlinkdir.h" #include "priv-set.h" +#include "root-uid.h" #include #if ! UNLINK_CANNOT_UNLINK_DIR @@ -43,7 +44,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; }