os_root.c

Go to the documentation of this file.
00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1999, 2000
00005  *      Sleepycat Software.  All rights reserved.
00006  */
00007 
00008 #include "config.h"
00009 
00010 #ifndef lint
00011 static const char revid[] = "$Id: os__root_8c-source.html,v 1.1 2008/06/08 10:21:28 sebdiaz Exp $";
00012 #endif /* not lint */
00013 
00014 #ifndef NO_SYSTEM_INCLUDES
00015 #include <sys/types.h>
00016 
00017 #include <unistd.h>
00018 #endif
00019 
00020 #include "db_int.h"
00021 
00022 /*
00023  * CDB___os_isroot --
00024  *      Return if user has special permissions.
00025  *
00026  * PUBLIC: int CDB___os_isroot __P((void));
00027  */
00028 int
00029 CDB___os_isroot()
00030 {
00031 #ifdef HAVE_GETUID
00032         return (getuid() == 0);
00033 #else
00034         return (0);
00035 #endif
00036 }

Generated on Sun Jun 8 10:56:38 2008 for GNUmifluz by  doxygen 1.5.5