Changeset 25df647 for server/inst
- Timestamp:
- Jun 29, 2010, 7:13:57 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups, web
- Children:
- b77c92c
- Parents:
- 8b676cb
- git-author:
- Jessica B. Hamrick <jhamrick@…> (06/29/10 19:13:57)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (06/29/10 19:13:57)
- Location:
- server/inst
- Files:
-
- 4 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/inst/cups-set-perms
r30beeab r25df647 8 8 9 9 conffile="/etc/cups/cupsd.conf" 10 mv "$conffile" "$conffile. bak"10 mv "$conffile" "$conffile.gutenbach-orig" 11 11 touch "$conffile" 12 12 13 while read line; do 14 listen_localhost=$(echo "$line" | grep '^Listen localhost' || true) 15 if [ -n "$listen_localhost" ]; then 16 echo "#GUTENBACH$line" >> "$conffile" 17 else 18 root_location=$(echo "$line" | grep '^<Location />$' || true) 19 if [ -n "$root_location" ]; then 20 echo "<Location />" >> "$conffile" 21 echo "Allow from All # added by Gutenbach" >> "$conffile" 22 else 23 echo "$line" >> "$conffile" 24 fi 25 fi 13 cat >> "$conffile" <<EOF 14 # 15 # This cupsd.conf was generated by the Gutenbach music spooler 16 # 26 17 27 done < "$conffile.bak" 28 rm "$conffile.bak" 18 # Log general information in error_log - change "info" to "debug" for 19 # troubleshooting... 20 LogLevel warning 29 21 30 cat >> "$conffile" <<EOF 31 # Begin configurations for gutenbach 22 # Administrator user group... 23 SystemGroup lpadmin 24 Group audio 32 25 33 Group audio 26 Listen /var/run/cups/cups.sock 34 27 Listen * 28 35 29 ServerAlias * 30 31 # Default authentication type, when authentication is required... 32 DefaultAuthType Basic 33 34 # Restrict access to the server... 35 <Location /> 36 Allow from All 37 Order deny,allow 38 </Location> 39 40 # Restrict access to the admin pages... 41 <Location /admin> 42 Encryption Required 43 Order deny,allow 44 </Location> 45 46 # Restrict access to configuration files... 47 <Location /admin/conf> 48 AuthType Default 49 Require user @SYSTEM 50 Order deny,allow 51 </Location> 52 53 # Set the default printer/job policies... 54 <Policy default> 55 # Job-related operations must be done by the owner or an administrator... 56 <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job> 57 Allow from All 58 Order deny,allow 59 </Limit> 60 61 # All administration operations require an administrator to authenticate... 62 <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default> 63 AuthType Default 64 Require user @SYSTEM 65 Order deny,allow 66 </Limit> 67 68 # All printer operations require a printer operator to authenticate... 69 <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs> 70 AuthType Default 71 Require user @SYSTEM 72 Order deny,allow 73 </Limit> 74 75 <Limit All> 76 Order deny,allow 77 </Limit> 78 </Policy> 36 79 37 80 <Location /printers/$printername> … … 41 84 </Limit> 42 85 43 Order Deny, Allow86 Order deny,allow 44 87 Allow from All 45 88 </Location> 46 47 # End configurations for gutenbach48 89 EOF 49 90
Note: See TracChangeset
for help on using the changeset viewer.