Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ done])
AC_DEFINE_UNQUOTED([FAILLOG_FILE], ["$shadow_cv_logdir/faillog"],
[Path for faillog file.])

AC_DEFINE_UNQUOTED([PASSWD_PROGRAM], ["$exec_prefix/bin/passwd"],
[Path to passwd program.])

AC_ARG_ENABLE([shadowgrp],
[AS_HELP_STRING([--enable-shadowgrp], [enable shadow group support @<:@default=yes@:>@])],
[case "${enableval}" in
Expand Down
3 changes: 2 additions & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

AUTOMAKE_OPTIONS = 1.0 foreign

DEFS =
DEFS = \
-DPATH_PASSWD='"$(bindir)/passwd"'

noinst_LTLIBRARIES = libshadow.la

Expand Down
12 changes: 6 additions & 6 deletions lib/age.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "shadow/gshadow/endsgent.h"


#ident "$Id$"

#ifndef PASSWD_PROGRAM
#define PASSWD_PROGRAM "/bin/passwd"
#ifndef PATH_PASSWD
#define PATH_PASSWD "/bin/passwd"
#endif


/*
* expire - force password change if password expired
*
Expand Down Expand Up @@ -116,9 +116,9 @@ int expire (const struct passwd *pw, /*@null@*/const struct spwd *sp)
_exit (126);
}

(void) execl (PASSWD_PROGRAM, PASSWD_PROGRAM, pw->pw_name, (char *) NULL);
(void) execl(PATH_PASSWD, PATH_PASSWD, pw->pw_name, (char *) NULL);
err = errno;
perror ("Can't execute " PASSWD_PROGRAM);
perror("Can't execute " PATH_PASSWD);
_exit ((ENOENT == err) ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
} else if ((pid_t) -1 == pid) {
perror ("fork");
Expand Down
Loading