Bug#314382: lprng: log rotation leaves /var/log/lpr.log with incorrect owner/permissions

2005-06-15 Thread David D. Kilzer
Package: lprng
Version: 3.8.28-2
Severity: normal

The log rotation of /var/log/lpr.log leaves the file with incorrect
ownership and incorrect permissions.  The log file is left in this
state:

-rw-r-  1 root adm 0 Jun 15 07:48 /var/log/lpr.log

When checkpc is run nightly in /etc/cron.daily/lprng, it generates an
entry like this in /var/log/syslog:

Jun 15 07:46:19 tweek lpd: cron.daily found errors, run checkpc for details.

When checkpc is run, it complains:

[EMAIL PROTECTED]:~# checkpc
Warning -  ** cannot open '/var/log/lpr.log' - 'Permission denied'
Warning - owner/group of '/var/log/lpr.log' are 0/4, not 1/7
Warning - permissions of '/var/log/lpr.log' are 0640, not 0600

I can't figure out what's doing the log rotation, but I suspect it's
lprng itself.  The log rotation process needs to be fixed to set the
correct ownership and permissions on the log files.

Dave


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.20-ben7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages lprng depends on:
ii  debconf 1.4.50   Debian configuration management sy
ii  libc6   2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libcomerr2  1.37+1.38-WIP-0509-1 common error description library
ii  libkrb531.3.6-3  MIT Kerberos runtime libraries
ii  libssl0.9.7 0.9.7g-1 SSL shared libraries

-- debconf information:
  lprng/setuid_tools: false
* lprng/start_lpd: true
  lprng/twolpd_perms:
  lprng/twolpd_conf:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#314382: lprng: log rotation leaves /var/log/lpr.log with incorrect owner/permissions

2005-06-15 Thread Craig Small
On Wed, Jun 15, 2005 at 07:16:58PM -0500, David D. Kilzer wrote:
 The log rotation of /var/log/lpr.log leaves the file with incorrect
 ownership and incorrect permissions.  The log file is left in this
 state:

The package doing this is sysklogd and those permissions would be ok
as the syslog daemon is the one writing to it.

 -rw-r-  1 root adm 0 Jun 15 07:48 /var/log/lpr.log

So the question is not why are the permissions like that, they're fine
for a syslog-generated file, but why is checkpc complaining?

I strongly suspect that you've got something configured incorrectly and
it would lead to problems as syslogd has the file open. It might mean
for example that lpd will block as it tries to open the log file.

# fuser -v /var/log/lpr.log

 USERPID ACCESS COMMAND
/var/log/lpr.log root   4171 f  syslogd


So where is /var/log/lpr.log referenced in your printcap or /etc/lprng/
files?

 - Craig
-- 
Craig Small  GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE Debian developer
csmall at : enc.com.au  ieee.org   debian.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]