X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fwrite-any-file.c;h=f6d2747cb35258095ef720b556d7c243b398436b;hb=fa1db0dd22768f09a507674a30beb5b8a87bb35f;hp=74884e844e598dfe211544046c70c72643fcfbf3;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/write-any-file.c b/lib/write-any-file.c index 74884e844..f6d2747cb 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-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2013 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;