Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

os_root.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1999-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: os_root.c,v 12.2 2005/08/10 15:47:26 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #ifndef NO_SYSTEM_INCLUDES
00013 #include <sys/types.h>
00014 #endif
00015 
00016 #include "db_int.h"
00017 
00018 /*
00019  * __os_isroot --
00020  *      Return if user has special permissions.
00021  *
00022  * PUBLIC: int __os_isroot __P((void));
00023  */
00024 int
00025 __os_isroot()
00026 {
00027 #ifdef HAVE_GETUID
00028         return (getuid() == 0);
00029 #else
00030         return (0);
00031 #endif
00032 }

Generated on Sun Dec 25 12:14:42 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2