summaryrefslogtreecommitdiffstats
path: root/login-utils/chfn.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:44 +0100
committerKarel Zak2006-12-07 00:25:44 +0100
commit66ee8158b69525e12060ef558cb5d77feadab1dc (patch)
tree08b30f2d07df9213f5647bc6f60b5090a263ef43 /login-utils/chfn.c
parentImported from util-linux-2.10m tarball. (diff)
downloadkernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.gz
kernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.xz
kernel-qcow2-util-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.zip
Imported from util-linux-2.10s tarball.
Diffstat (limited to 'login-utils/chfn.c')
-rw-r--r--login-utils/chfn.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index 73a9b8918..de228241b 100644
--- a/login-utils/chfn.c
+++ b/login-utils/chfn.c
@@ -34,6 +34,8 @@
#include <ctype.h>
#include <getopt.h>
#include "my_crypt.h"
+#include "islocal.h"
+#include "setpwnam.h"
#include "nls.h"
#include "env.h"
@@ -42,15 +44,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
@@ -69,17 +62,15 @@ struct finfo {
char *other;
};
-static boolean parse_argv P((int argc, char *argv[], struct finfo *pinfo));
-static void usage P((FILE *fp));
-static void parse_passwd P((struct passwd *pw, struct finfo *pinfo));
-static void ask_info P((struct finfo *oldfp, struct finfo *newfp));
-static char *prompt P((char *question, char *def_val));
-static int check_gecos_string P((char *msg, char *gecos));
-static boolean set_changed_data P((struct finfo *oldfp, struct finfo *newfp));
-static int save_new_data P((struct finfo *pinfo));
-static void *xmalloc P((int bytes));
-
-extern int setpwnam P((struct passwd *pwd));
+static boolean parse_argv (int argc, char *argv[], struct finfo *pinfo);
+static void usage (FILE *fp);
+static void parse_passwd (struct passwd *pw, struct finfo *pinfo);
+static void ask_info (struct finfo *oldfp, struct finfo *newfp);
+static char *prompt (char *question, char *def_val);
+static int check_gecos_string (char *msg, char *gecos);
+static boolean set_changed_data (struct finfo *oldfp, struct finfo *newfp);
+static int save_new_data (struct finfo *pinfo);
+static void *xmalloc (int bytes);
#define memzero(ptr, size) memset((char *) ptr, 0, size)