X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-keys/blobdiff_plain/33aa94e8966d10478a2087a1c9dd445e92673933..28bb1ec395f56d0b6fe7d2904b5c59c7cbddab87:/userv/claim-dir.in diff --git a/userv/claim-dir.in b/userv/claim-dir.in index 4cc6032..ef8349e 100644 --- a/userv/claim-dir.in +++ b/userv/claim-dir.in @@ -4,7 +4,9 @@ if ( glob service claim-dir & glob service-user root - & grep calling-user-shell /etc/shells + & ( grep calling-user-shell /etc/shells + | glob calling-user-shell /dev/token-shells/userv + ) ) no-suppress-args null-fd 0 @@ -16,7 +18,7 @@ if ( glob service claim-dir 1) filsys=$1 ;; \ *) echo >&2 \"usage: $quis FILSYS\"; exit 1 ;; \ esac; \ - foundp=nil; \ + foundp=nil; mode=700; \ while read fs dir opts; do \ case \"$fs\" in \ \\#* | \"\") continue ;; \ @@ -61,6 +63,9 @@ if ( glob service claim-dir ;; \ esac \ ;; \ + mode=*) \ + mode=$arg \ + ;; \ mount=*) \ if ! mountpoint -q \"$dir\"; then $arg \"$dir\"; fi \ ;; \ @@ -74,7 +79,7 @@ if ( glob service claim-dir set _ $USERV_GROUP; group=$2; \ cd \"$dir\"; \ if [ ! -d \"$user\" ]; then \ - mkdir -m700 \"$user\"; \ + mkdir -m$mode \"$user\"; \ chown \"$user:$group\" \"$user\"; \ fi; \ echo \"$dir/$USERV_USER\" \