diff options
Diffstat (limited to 'login-utils/chsh.c')
-rw-r--r-- | login-utils/chsh.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/login-utils/chsh.c b/login-utils/chsh.c index f17b176fb..d1a3fa820 100644 --- a/login-utils/chsh.c +++ b/login-utils/chsh.c @@ -37,6 +37,8 @@ #include <ctype.h> #include <getopt.h> #include "my_crypt.h" +#include "islocal.h" +#include "setpwnam.h" #include "nls.h" #include "env.h" @@ -45,15 +47,6 @@ #include <security/pam_misc.h> #endif -extern int is_local(char *); - -#undef P -#if __STDC__ -#define P(foo) foo -#else -#define P(foo) () -#endif - typedef unsigned char boolean; #define false 0 #define true 1 @@ -71,19 +64,17 @@ struct sinfo { char *shell; }; -static void parse_argv P((int argc, char *argv[], struct sinfo *pinfo)); -static void usage P((FILE *fp)); -static char *prompt P((char *question, char *def_val)); -static int check_shell P((char *shell)); -static boolean get_shell_list P((char *shell)); -static void *xmalloc P((int bytes)); -extern int setpwnam P((struct passwd *pwd)); +static void parse_argv (int argc, char *argv[], struct sinfo *pinfo); +static void usage (FILE *fp); +static char *prompt (char *question, char *def_val); +static int check_shell (char *shell); +static boolean get_shell_list (char *shell); +static void *xmalloc (int bytes); + #define memzero(ptr, size) memset((char *) ptr, 0, size) -int main (argc, argv) - int argc; - char *argv[]; -{ +int +main (int argc, char *argv[]) { char *cp, *shell, *oldshell; uid_t uid; struct sinfo info; |