/*
* 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
* SUCH DAMAGE.
*
* @(#)chpass.h 8.4 (Berkeley) 4/2/94
+ * $FreeBSD$
*/
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_HPHONE 9
#define E_LOCATE 10
#define E_NAME 7
-#define E_SHELL 12
+#define E_OTHER 11
+#define E_SHELL 13
extern ENTRY list[];
-extern uid_t uid;
+extern int master_mode;
-int atot __P((char *, time_t *));
-void display __P((int, struct passwd *));
-void edit __P((struct passwd *));
-char *ok_shell __P((char *));
-int p_change __P((char *, struct passwd *, ENTRY *));
-int p_class __P((char *, struct passwd *, ENTRY *));
-int p_expire __P((char *, struct passwd *, ENTRY *));
-int p_gecos __P((char *, struct passwd *, ENTRY *));
-int p_gid __P((char *, struct passwd *, ENTRY *));
-int p_hdir __P((char *, struct passwd *, ENTRY *));
-int p_login __P((char *, struct passwd *, ENTRY *));
-int p_login __P((char *, struct passwd *, ENTRY *));
-int p_passwd __P((char *, struct passwd *, ENTRY *));
-int p_shell __P((char *, struct passwd *, ENTRY *));
-int p_uid __P((char *, struct passwd *, ENTRY *));
-char *ttoa __P((time_t));
-int verify __P((struct passwd *));
+int atot(char *, time_t *);
+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_gecos(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_passwd(char *, struct passwd *, ENTRY *);
+int p_shell(char *, struct passwd *, ENTRY *);
+int p_uid(char *, struct passwd *, ENTRY *);
+char *ttoa(time_t);