[Sorry for x-posting, not sure where this is
more relevant.]

Hi!

I have hit the following nasty problem with
/etc/periodic/daily/300.calendar while using
NIS.  We have our NIS database distributed
with all shells switched off to /sbin/nologin,
and overriding shells as necessary on machines
where we need it.  Something like this:

+ru:::::::::/bin/tcsh
+:::::::::

When calendar(1)'s -a option is in use, the
code traverses the list of all users in the
getpwent(3) cycle, checks to see if the user
has a valid calendar file, and if so, mails
him the current entries (if there are).

The problem is that the "ru" entry is reported
by getpwent(3) twice, first with /bin/tcsh
shell, and second with the /sbin/nologin shell.
The net effect is that you get your calendar
mail twice.

Is this the correct behavior of getpwent(3),
and then what do we do with calendar(1), or
getpwent(3) is in trouble?  (I've checked that
on both 4.x and 5.0.)


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

Attachment: msg41526/pgp00000.pgp
Description: PGP signature

Reply via email to