version 1.6, 1997/02/16 20:08:56 |
version 1.7, 1997/03/27 00:30:53 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <pwd.h> |
#include <pwd.h> |
|
#include <err.h> |
#include <errno.h> |
#include <errno.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
#include <ctype.h> |
#include <fcntl.h> |
#include <fcntl.h> |
#include <util.h> |
#include <util.h> |
|
|
uid_t uid; |
static uid_t uid; |
|
|
char *progname = "passwd"; |
|
char *tempname; |
|
|
|
|
int |
local_passwd(uname) |
local_passwd(uname) |
char *uname; |
char *uname; |
{ |
{ |
|
|
extern int use_yp; |
extern int use_yp; |
if (!use_yp) |
if (!use_yp) |
#endif |
#endif |
(void)fprintf(stderr, "passwd: unknown user %s.\n", uname); |
warnx("unknown user %s.", uname); |
return(1); |
return(1); |
} |
} |
|
|
uid = getuid(); |
uid = getuid(); |
if (uid && uid != pw->pw_uid) { |
if (uid && uid != pw->pw_uid) { |
(void)fprintf(stderr, "passwd: %s\n", strerror(EACCES)); |
warnx("login != uid: %s", strerror(EACCES)); |
return(1); |
return(1); |
} |
} |
|
|