-/*
+/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
* Copyright (c) 1988, 1993, 1994
* The Regents of the University of California. All rights reserved.
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * Portions of this software were developed for the FreeBSD Project by
+ * ThinkSec AS and NAI Labs, the Security Research Division of Network
+ * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+ * ("CBOSS"), as part of the DARPA CHATS research program.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
struct passwd;
typedef struct _entry {
- char *prompt;
- int (*func)(), restricted, len;
- char *except, *save;
+ const char *prompt;
+ int (*func)(char *, struct passwd *, struct _entry *);
+ int restricted;
+ size_t len;
+ const char *except, *save;
} ENTRY;
/* Field numbers. */
#define E_SHELL 13
extern ENTRY list[];
-extern uid_t uid;
+extern int master_mode;
int atot(char *, time_t *);
-void display(int, struct passwd *);
-void edit(struct passwd *);
-char *ok_shell(char *);
+struct passwd *edit(const char *, struct passwd *);
+int ok_shell(char *);
+char *dup_shell(char *);
int p_change(char *, struct passwd *, ENTRY *);
int p_class(char *, struct passwd *, ENTRY *);
int p_expire(char *, struct passwd *, ENTRY *);
int p_gid(char *, struct passwd *, ENTRY *);
int p_hdir(char *, struct passwd *, ENTRY *);
int p_login(char *, struct passwd *, ENTRY *);
-int p_login(char *, struct passwd *, ENTRY *);
int p_passwd(char *, struct passwd *, ENTRY *);
int p_shell(char *, struct passwd *, ENTRY *);
int p_uid(char *, struct passwd *, ENTRY *);
char *ttoa(time_t);
-int verify(struct passwd *);