From 99c4b4d57c744119292b706f4dd0c034d5ac423d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 13 Jan 2012 09:50:03 -0500 Subject: [PATCH] Include parent directories in case they don't already exist. This fixes a directory permissions problem with the AIX package when the /usr/local directories don't already exist. --HG-- branch : 1.7 --- sudo.pp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sudo.pp b/sudo.pp index d384d1375..3e1599ad8 100644 --- a/sudo.pp +++ b/sudo.pp @@ -12,7 +12,7 @@ limited root privileges to users and log root activity. \ The basic philosophy is to give as few privileges as possible but \ still allow people to get their work done." vendor="Todd C. Miller" - copyright="(c) 1993-1996,1998-2011 Todd C. Miller" + copyright="(c) 1993-1996,1998-2012 Todd C. Miller" %if [aix] # AIX package summary is limited to 40 characters @@ -176,7 +176,20 @@ still allow people to get their work done." EOF %endif + # OS-level directories that should generally exist but might not. + extradirs=`echo ${pp_destdir}/${mandir}/[mc]* | sed "s#${pp_destdir}/##g"` + extradirs="$extradirs `dirname $docdir` `dirname $timedir`" + test -d ${pp_destdir}/etc/pam.d && extradirs="${extradirs} /etc/pam.d" + for dir in $bindir $sbindir $libexecdir $extradirs; do + while test "$dir" != "/"; do + osdirs="${osdirs}${osdirs+ }$dir/" + dir=`dirname $dir` + done + done + osdirs=`echo $osdirs | tr " " "\n" | sort -u` + %files + $osdirs - $bindir/sudo 4111 root: $bindir/sudoedit 4111 root: $sbindir/visudo 0111 -- 2.40.0