Subject: man pages & mailq in cvs

From: Ambrose Li <[email-masked]>
Date: Sun, 21 Apr 2002 00:42:44 -0400

Hi,

I have 2 questions about the CVS snapshot.

First, in the "man" subdirectory, we have in Makefile.in

   #prefix=        @prefix@
   MANDIR=         ${prefix}@mandir@

@mandir@ seems to expand to ${prefix}/man, so ${prefix} in MANDIR
is superfluous. Perhaps this is why prefix=@prefix@ was commented
out?

The second questions is about the behaviour of the "mailq -s"
command. A non-root user will get

   0 entries in router queue: idle
   mailq: opendir(/var/spool/postoffice/deferred): Permission denied
   mailq: opendir(.mo): Permission denied
   -1 messages in transport queue: working

but the mailq man page does not document the requirement that
the "-s" option requires root privileges. Is this a bug in
the mailq command, a bug in post-install, or should the man
page be updated?

Best regards,

-- 
Ambrose Li  <[email-masked]>   http://trends.ca/~acli/
                                              http://www.cccgt.org/
A good style should show no sign of effort;
  what is written should seem a happy accident. - Somerset Maugham
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Ambrose Li <[email-masked]>
Date: Sun, 21 Apr 2002 00:53:12 -0400

Hi,

I found a small bug in the mailq command. Patch follows:

--- mailq.c.dist	Thu Jan 24 17:18:47 2002
+++ mailq.c	Sun Apr 21 00:47:45 2002
@@ -645,7 +645,7 @@
 	dirp = opendir(dirpath);
 	if (dirp == NULL) {
 	  fprintf(stderr, "%s: opendir(%s): %s\n",
-		  progname, dpath, strerror(errno));
+		  progname, dirpath, strerror(errno));
 	  return -1;
 	}
 	for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {

As for the Permission denied error in mailq, what is the risk of
added "o=r" permissions to the deferred and transport directories?

Regards,