#include "setpwnam.h"
#include "nls.h"
#include "env.h"
+#include "pathnames.h"
#if defined(REQUIRE_PASSWORD) && defined(HAVE_SECURITY_PAM_MISC_H)
#include <security/pam_appl.h>
#endif
oldshell = pw->pw_shell;
- if (!oldshell[0]) oldshell = "/bin/sh";
+ if (!oldshell[0]) oldshell = _PATH_BSHELL;
/* reality check */
if (uid != 0 && uid != pw->pw_uid) {
" denied\n"),whoami);
return (-1);
}
-
+
shell = info.shell;
printf( _("Changing shell for %s.\n"), pw->pw_name );
shell = prompt (_("New shell"), oldshell);
if (! shell) return 0;
}
-
+
if (check_shell (shell) < 0) return (-1);
if (! strcmp (pw->pw_shell, shell)) {
printf (_("Shell not changed.\n"));
return 0;
}
- if (!strcmp(shell, "/bin/sh")) shell = "";
+ if (!strcmp(shell, _PATH_BSHELL)) shell = "";
pw->pw_shell = shell;
if (setpwnam (pw) < 0) {
perror ("setpwnam");
prompt (char *question, char *def_val) {
int len;
char *ans, *cp;
-
+
if (! def_val) def_val = "";
printf("%s [%s]: ", question, def_val);
*buf = 0;