ports/misc/findutils/files/patch-locate__updatedb.sh
Frederic Culot bfd35bbb51 - Add a patch to fix usage of su(1) in the gupdatedb script provided
with findutils
- Bump PORTREVISION

PR:		ports/157129
Submitted by:	Klaus Aehlig <aehlig@linta.de> (maintainer)
2011-05-20 12:20:53 +00:00

38 lines
1.3 KiB
Bash

--- locate/updatedb.sh.orig 2011-04-03 23:53:12.000000000 +0100
+++ locate/updatedb.sh 2011-05-17 18:20:29.000000000 +0100
@@ -250,7 +250,7 @@
if test -n "$SEARCHPATHS"; then
if [ "$LOCALUSER" != "" ]; then
# : A1
- su $LOCALUSER `select_shell $LOCALUSER` -c \
+ su -m $LOCALUSER -c \
"$find $SEARCHPATHS $FINDOPTIONS \
\\( $prunefs_exp \
-type d -regex '$PRUNEREGEX' \\) -prune -o $print_option"
@@ -266,7 +266,7 @@
myuid=`getuid`
if [ "$myuid" = 0 ]; then
# : A3
- su $NETUSER `select_shell $NETUSER` -c \
+ su -m $NETUSER -c \
"$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" ||
exit $?
else
@@ -319,7 +319,7 @@
if test -n "$SEARCHPATHS"; then
if [ "$LOCALUSER" != "" ]; then
# : A5
- su $LOCALUSER `select_shell $LOCALUSER` -c \
+ su -m $LOCALUSER -c \
"$find $SEARCHPATHS $FINDOPTIONS \
\( $prunefs_exp \
-type d -regex '$PRUNEREGEX' \) -prune -o $print_option" || exit $?
@@ -335,7 +335,7 @@
myuid=`getuid`
if [ "$myuid" = 0 ]; then
# : A7
- su $NETUSER `select_shell $NETUSER` -c \
+ su -m $NETUSER -c \
"$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" ||
exit $?
else