/* euidaccess -- check if effective user id can access file
- Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2012 Free
+ Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2013 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
#include <sys/stat.h>
#include <unistd.h>
+#include "root-uid.h"
+
#if HAVE_LIBGEN_H
# include <libgen.h>
#endif
/* The super-user can read and write any file, and execute any file
that anyone can execute. */
- if (euid == 0 && ((mode & X_OK) == 0
- || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
+ if (euid == ROOT_UID
+ && ((mode & X_OK) == 0
+ || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
return 0;
/* Convert the mode to traditional form, clearing any bogus bits. */