Commit 8e7f3107 authored by Wayne Davison's avatar Wayne Davison

Avoid -u option to id since solaris doesn't support it.

parent c2dd3ec3
......@@ -37,7 +37,7 @@ case $0 in
;;
*)
RSYNC="$RSYNC --super"
case `id -u` in
case `get_testuid` in
'') ;; # If "id" failed, try to continue...
0) ;;
*) if [ -f /usr/bin/fakeroot ]; then
......
......@@ -42,7 +42,7 @@ cd "$scratchdir"
ln -s test-rsyncd.conf rsyncd.conf
confopt=''
case `id -u` in
case `get_testuid` in
0)
# Root needs to specify the config file, or it uses /etc/rsyncd.conf.
echo "Forcing --config=$conf"
......
......@@ -51,7 +51,7 @@ case $0 in
esac
;;
*)
case `id -u` in
case `get_testuid` in
'') ;; # If "id" failed, try to continue...
0) ;;
*) if [ -f /usr/bin/fakeroot ]; then
......
......@@ -99,6 +99,10 @@ rsync_ls_lR() {
find "$@" -print | sort | sed 's/ /\\ /g' | xargs "$TOOLDIR/tls" $TLS_ARGS
}
get_testuid() {
id 2>/dev/null | sed 's/^[^0-9]*\([0-9][0-9]*\).*/\1/'
}
check_perms() {
perms=`"$TOOLDIR/tls" "$1" | sed 's/^[-d]\(.........\).*/\1/'`
if test $perms = $2; then
......@@ -258,7 +262,7 @@ build_rsyncd_conf() {
uid_setting='uid = 0'
gid_setting='gid = 0'
case `id -u` in
case `get_testuid` in
0) ;;
*)
# Non-root cannot specify uid & gid settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment