version 1.3, 2002/05/11 23:16:44 |
version 1.4, 2002/05/14 18:05:39 |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
/* System Headers */ |
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <errno.h> |
#include <errno.h> |
#include <pwd.h> |
#include <pwd.h> |
|
|
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
/* Local headers */ |
|
|
|
#include "at.h" |
#include "at.h" |
#include "panic.h" |
#include "panic.h" |
#include "pathnames.h" |
#include "pathnames.h" |
#include "privs.h" |
#include "privs.h" |
|
|
/* File scope variables */ |
|
|
|
#ifndef lint |
#ifndef lint |
static const char rcsid[] = "$OpenBSD$"; |
static const char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
|
|
/* Function declarations */ |
|
|
|
static int check_for_user(FILE *, const char *); |
static int check_for_user(FILE *, const char *); |
|
|
/* Local functions */ |
|
|
|
static int |
static int |
check_for_user(FILE *fp, const char *name) |
check_for_user(FILE *fp, const char *name) |
|
|
} |
} |
|
|
|
|
/* Global functions */ |
|
|
|
int |
int |
check_permission(void) |
check_permission(void) |
{ |
{ |
|
|
return 1; |
return 1; |
|
|
if ((pentry = getpwuid(uid)) == NULL) { |
if ((pentry = getpwuid(uid)) == NULL) { |
perror("Cannot access user database"); |
perror("Cannot access password database"); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |
|
|