File: 07_fix_log_perm.patch

package info (click to toggle)
ldapscripts 2.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 492 kB
  • ctags: 21
  • sloc: sh: 707; makefile: 167
file content (14 lines) | stat: -rw-r--r-- 339 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/lib/runtime
+++ b/lib/runtime
@@ -94,6 +94,11 @@
           echo "Unable to create $LOGFILE, exiting..." && exit 1
         fi
         umask "$_TMPMASK"
+      else
+        if [ $(($(stat -c %a "$LOGFILE")%10)) -ne 0 ]
+	then
+	  echo "WARNING: Unsafe permissions on $LOGFILE"
+	fi
       fi
       echo "$1" >> "$LOGFILE"
     fi