]> git.proxmox.com Git - mirror_frr.git/commitdiff
debianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod
authorMartin Winter <mwinter@opensourcerouting.org>
Mon, 19 Mar 2018 18:16:09 +0000 (11:16 -0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 27 Mar 2018 14:05:47 +0000 (07:05 -0700)
New lintian version causes warning for recursive chown and chmod. This
change avoids the the recursive operation by splitting it into to commands

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
debianpkg/frr.postinst
debianpkg/frr.preinst

index cbc45f03ebd0dfde8feac4e5684e3f1df747ca86..972f8c0500fb500fdd48004307f14e195b9e876b 100644 (file)
@@ -12,7 +12,8 @@ frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'`
 [ -n ${frrgid} ]    || (echo "No gid for frr in ${GROUPFILE}"    && /bin/false)
 [ -n ${frrVTYgid} ] || (echo "No gid for frrvty in ${GROUPFILE}" && /bin/false)
 
-chown -R ${frruid}:${frrgid} /etc/frr
+chown ${frruid}:${frrgid} /etc/frr
+chown ${frruid}:${frrgid} /etc/frr/*
 touch /etc/frr/vtysh.conf
 chgrp ${frrvtygid} /etc/frr/vtysh*
 chmod 644 /etc/frr/*
index 467bea971834adf8f4205e2e3f7817de3d5a1626..477e690d0aac4896bf760d605d856bf590c00e55 100644 (file)
@@ -39,14 +39,16 @@ if [ "$1" = "install" ]; then
   # Logfiles are group readable in case users were put into the frr group.
   d=/var/log/frr/
     mkdir -p $d
-    chown -R frr:frr $d
+    chown frr:frr $d
+    chown --quiet frr:frr $d/* | true
     chmod u=rwx,go=rx $d
     find $d -type f -print0 | xargs -0 --no-run-if-empty   chmod u=rw,g=r,o=
 
   # Strict permissions for the sockets.
   d=/var/run/frr/
     mkdir -p $d
-    chown -R frr:frr $d
+    chown frr:frr $d
+    chown --quiet frr:frr $d/* | true
     chmod u=rwx,go=rx $d
     find $d -type f -print0 | xargs -0 --no-run-if-empty   chmod u=rw,go=