|
|
#include "rcp_locl.h" | #include "rcp_locl.h" |
#include <getarg.h> | #include <getarg.h> |
| |
#define RSH_PROGRAM "rsh" |
#define RSH_PROGRAM "krsh" |
| |
struct passwd *pwd; | struct passwd *pwd; |
uid_t userid; | uid_t userid; |
|
|
#define _PATH_CP "/bin/cp" | #define _PATH_CP "/bin/cp" |
#endif | #endif |
#undef _PATH_RSH | #undef _PATH_RSH |
#define _PATH_RSH BINDIR "/rsh" |
#define _PATH_RSH BINDIR "/krsh" |
|
|
#endif | #endif |
| |
#undef _PATH_LOGIN | #undef _PATH_LOGIN |
#define _PATH_LOGIN BINDIR "/login" |
#define _PATH_LOGIN BINDIR "/klogin" |
| |
/* fallbacks */ | /* fallbacks */ |
| |
|
|
#ifdef HAVE_SHADOW_H | #ifdef HAVE_SHADOW_H |
| |
#ifndef _PATH_CHPASS | #ifndef _PATH_CHPASS |
#define _PATH_CHPASS "/usr/bin/passwd" |
#define _PATH_CHPASS "/usr/bin/kpasswd" |
#endif | #endif |
| |
static int | static int |
|
|
printf("fork /bin/passwd"); | printf("fork /bin/passwd"); |
exit(1); | exit(1); |
case 0: | case 0: |
execlp(_PATH_CHPASS, "passwd", who->pw_name, (char *) 0); |
execlp(_PATH_CHPASS, "kpasswd", who->pw_name, (char *) 0); |
exit(1); | exit(1); |
default: | default: |
waitpid(pid, &status, 0); | waitpid(pid, &status, 0); |