/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1999-2016 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
- *
+ *
* "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
- *
+ *
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License."
- *
+ *
* @APPLE_LICENSE_HEADER_END@
*/
#define INFO_FILE 1
#define _PASSWORD_LEN 8
#endif
+#include "passwd.h"
+
const char* progname = "chkpasswd";
static int literal = 0;
-extern int file_check_passwd(char *, char *);
-extern int nis_check_passwd(char *, char *);
-extern int od_check_passwd(char *, char *);
-extern int pam_check_passwd(char *);
-
void
checkpasswd(char *name, char *old_pw)
{
return;
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr, "usage: chkpasswd [-i infosystem] [-l location] [-c] [name]\n");
fprintf(stderr, " infosystem:\n");
}
argc -= optind;
argv += optind;
-
+
if (argc > 1) {
usage();
} else if (argc == 1) {
exit(1);
}
}
-
+
switch (infosystem)
{
case INFO_FILE:
exit(0);
}
-