]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
rpc: always create remote helper with user's group
authorSimon Ruderich <simon@ruderich.org>
Wed, 21 Apr 2021 06:16:03 +0000 (08:16 +0200)
committerSimon Ruderich <simon@ruderich.org>
Wed, 21 Apr 2021 06:30:15 +0000 (08:30 +0200)
If the group does not match the current user's group then the remote
helper will be uploaded again on each run.

rpc/dial.go

index ef280191ef57b23ca8f03461a97af206e23ecc67..d8a63386333d2c76c27affca33418d3378bcc4dc 100644 (file)
@@ -181,6 +181,8 @@ f() {
                rm "$tmp"
                # Make file executable
                chmod 0700 "$x"
+               # Some BSD create files with group wheel in /tmp
+               chgrp "$(id -g)" "$x"
        fi
 
        exec "$x" sync