Re: CVS commit: src/external/bsd/cron/dist

2014-06-22 Thread Christos Zoulas
On Jun 22,  8:58pm, dholland-sourcechan...@netbsd.org (David Holland) wrote:
-- Subject: Re: CVS commit: src/external/bsd/cron/dist

| On Sun, Jun 22, 2014 at 04:53:50PM -0400, Christos Zoulas wrote:
|  > |  > >Modified Files:
|  > |  > > src/external/bsd/cron/dist: do_command.c
|  > |  > >
|  > |  > >Log Message:
|  > |  > >Log some actual information on various failures, so you can tell
|  > |  > >what happened.
|  > |  > 
|  > |  > ??? This code is not used. We are using the LOGIN_CAP code. What are 
you
|  > |  > trying to fix?
|  > | 
|  > | Isn't it? (All of it?) I had a problem at one point (a few months
|  > | back, I think, it took me a while to remember to fetch the patch out
|  > | and commit it) that was printing a useless message, and I added some
|  > | extra information to diagnose it, and in the course of found a lot of
|  > | similar diagnostics and patched them all for completeness.
|  > 
|  > All of it :-)
| 
| The chdir one is outside of LOGIN_CAP. That's the one I hit, I think
| because of nfs/nis issues, and I fixed the rest because they're all
| the same.

That's the only one. I would have fixed them by also printing the string
that failed not just the user info. But that's better than before.

| I think I was contemplating sending the patch upstream. (is that
| worthwhile?)

Go for it. We have a *lot* of other patches that should be sent upstream
too.

christos


Re: CVS commit: src/external/bsd/cron/dist

2014-06-22 Thread David Holland
On Sun, Jun 22, 2014 at 04:53:50PM -0400, Christos Zoulas wrote:
 > |  > >Modified Files:
 > |  > >   src/external/bsd/cron/dist: do_command.c
 > |  > >
 > |  > >Log Message:
 > |  > >Log some actual information on various failures, so you can tell
 > |  > >what happened.
 > |  > 
 > |  > ??? This code is not used. We are using the LOGIN_CAP code. What are you
 > |  > trying to fix?
 > | 
 > | Isn't it? (All of it?) I had a problem at one point (a few months
 > | back, I think, it took me a while to remember to fetch the patch out
 > | and commit it) that was printing a useless message, and I added some
 > | extra information to diagnose it, and in the course of found a lot of
 > | similar diagnostics and patched them all for completeness.
 > 
 > All of it :-)

The chdir one is outside of LOGIN_CAP. That's the one I hit, I think
because of nfs/nis issues, and I fixed the rest because they're all
the same.

I think I was contemplating sending the patch upstream. (is that
worthwhile?)

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/external/bsd/cron/dist

2014-06-22 Thread Christos Zoulas
On Jun 22,  4:50pm, dholland-sourcechan...@netbsd.org (David Holland) wrote:
-- Subject: Re: CVS commit: src/external/bsd/cron/dist

| On Sat, Jun 21, 2014 at 02:20:59PM +, Christos Zoulas wrote:
|  > >Modified Files:
|  > >  src/external/bsd/cron/dist: do_command.c
|  > >
|  > >Log Message:
|  > >Log some actual information on various failures, so you can tell
|  > >what happened.
|  > 
|  > ??? This code is not used. We are using the LOGIN_CAP code. What are you
|  > trying to fix?
| 
| Isn't it? (All of it?) I had a problem at one point (a few months
| back, I think, it took me a while to remember to fetch the patch out
| and commit it) that was printing a useless message, and I added some
| extra information to diagnose it, and in the course of found a lot of
| similar diagnostics and patched them all for completeness.

All of it :-)

christos


Re: CVS commit: src/external/bsd/cron/dist

2014-06-22 Thread David Holland
On Sat, Jun 21, 2014 at 02:20:59PM +, Christos Zoulas wrote:
 > >Modified Files:
 > >src/external/bsd/cron/dist: do_command.c
 > >
 > >Log Message:
 > >Log some actual information on various failures, so you can tell
 > >what happened.
 > 
 > ??? This code is not used. We are using the LOGIN_CAP code. What are you
 > trying to fix?

Isn't it? (All of it?) I had a problem at one point (a few months
back, I think, it took me a while to remember to fetch the patch out
and commit it) that was printing a useless message, and I added some
extra information to diagnose it, and in the course of found a lot of
similar diagnostics and patched them all for completeness.

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/external/bsd/cron/dist

2014-06-21 Thread Christos Zoulas
In article <20140621043353.5eb4...@cvs.netbsd.org>,
David A. Holland  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  dholland
>Date:  Sat Jun 21 04:33:53 UTC 2014
>
>Modified Files:
>   src/external/bsd/cron/dist: do_command.c
>
>Log Message:
>Log some actual information on various failures, so you can tell
>what happened.

??? This code is not used. We are using the LOGIN_CAP code. What are you
trying to fix?

christos



re: CVS commit: src/external/bsd/cron/dist

2012-12-25 Thread matthew green

> >> On Mon, Dec 24, 2012 at 02:30:46PM -0500, Christos Zoulas wrote:
> >>  > Modified Files:
> >>  > src/external/bsd/cron/dist: database.c
> >>  > 
> >>  > Log Message:
> >>  > PR/47362: Brian Marcotte: cron is too restrictive on file permissions
> >>  > Allow file being writable by owner.
> >>  > XXX: pullup to 6.
> >
> >wasn't the problem that mode 0400 files were rejected?  ie, read-only
> >not writable files.

could you please fix the commit log?  it says the opposite.


.mrg.


Re: CVS commit: src/external/bsd/cron/dist

2012-12-25 Thread Christos Zoulas
In article <20121225142253.ge2...@arresum.veego.de>,
Bernd Ernesti   wrote:
>
>The commit message suggested something differently: Allow file being
>writable by owner.
>
It should say not writable. I've fixed it.
>
>I haven't checked the source but when does this happen and what is the
>result of this change now?
>Can you now change a read only file in /var/cron/tabs with crontab -e?

Writing should behave exactly like before.

christos



Re: CVS commit: src/external/bsd/cron/dist

2012-12-25 Thread Bernd Ernesti
On Tue, Dec 25, 2012 at 02:13:57PM +, Christos Zoulas wrote:
> In article <15993.1356420...@splode.eterna.com.au>,
> matthew green   wrote:
> >
> >> On Mon, Dec 24, 2012 at 02:30:46PM -0500, Christos Zoulas wrote:
> >>  > Modified Files:
> >>  > src/external/bsd/cron/dist: database.c
> >>  > 
> >>  > Log Message:
> >>  > PR/47362: Brian Marcotte: cron is too restrictive on file permissions
> >>  > Allow file being writable by owner.
> >>  > XXX: pullup to 6.
> >
> >wasn't the problem that mode 0400 files were rejected?  ie, read-only
> >not writable files.
> 
> Yes, it was allowing 0600 and not allowing 0400. Now it allows both.

The commit message suggested something differently: Allow file being writable 
by owner.

I haven't checked the source but when does this happen and what is the
result of this change now?
Can you now change a read only file in /var/cron/tabs with crontab -e?

Bernd



Re: CVS commit: src/external/bsd/cron/dist

2012-12-25 Thread Christos Zoulas
In article <15993.1356420...@splode.eterna.com.au>,
matthew green   wrote:
>
>> On Mon, Dec 24, 2012 at 02:30:46PM -0500, Christos Zoulas wrote:
>>  > Modified Files:
>>  >   src/external/bsd/cron/dist: database.c
>>  > 
>>  > Log Message:
>>  > PR/47362: Brian Marcotte: cron is too restrictive on file permissions
>>  > Allow file being writable by owner.
>>  > XXX: pullup to 6.
>
>wasn't the problem that mode 0400 files were rejected?  ie, read-only
>not writable files.

Yes, it was allowing 0600 and not allowing 0400. Now it allows both.

christos



re: CVS commit: src/external/bsd/cron/dist

2012-12-24 Thread matthew green

> On Mon, Dec 24, 2012 at 02:30:46PM -0500, Christos Zoulas wrote:
>  > Modified Files:
>  >src/external/bsd/cron/dist: database.c
>  > 
>  > Log Message:
>  > PR/47362: Brian Marcotte: cron is too restrictive on file permissions
>  > Allow file being writable by owner.
>  > XXX: pullup to 6.

wasn't the problem that mode 0400 files were rejected?  ie, read-only
not writable files.

> On reflection, I suspect that restriction was intentional -- e.g. for
> a restricted user whose homedir is owned by root and so forth, you
> might want to give them a crontab but not let them modify it.


.mrg.


Re: CVS commit: src/external/bsd/cron/dist

2012-12-24 Thread David Holland
On Mon, Dec 24, 2012 at 02:30:46PM -0500, Christos Zoulas wrote:
 > Modified Files:
 >  src/external/bsd/cron/dist: database.c
 > 
 > Log Message:
 > PR/47362: Brian Marcotte: cron is too restrictive on file permissions
 > Allow file being writable by owner.
 > XXX: pullup to 6.

On reflection, I suspect that restriction was intentional -- e.g. for
a restricted user whose homedir is owned by root and so forth, you
might want to give them a crontab but not let them modify it.

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/external/bsd/cron/dist

2011-10-12 Thread David Holland
On Wed, Oct 12, 2011 at 12:39:48PM -0400, Christos Zoulas wrote:
 > Modified Files:
 >  src/external/bsd/cron/dist: cron.8 database.c pathnames.h
 > 
 > Log Message:
 > process files in /etc/cron.d/

For the record, I object to this change. I think keeping /etc small
and simple, and having one right way to do any given thing, is more
important (much more important in the long run) than making it
slightly easier to install canned cron scripts from packages.

This is predicated on the assumption that it's easier for a human to
handle one moderately large structured file than a lot of little tiny
files, but I believe this to be reasonable.


(...also, if I wanted redhat I know where to get it.)
-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/external/bsd/cron/dist

2011-10-12 Thread Thomas Klausner
On Wed, Oct 12, 2011 at 12:39:48PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Oct 12 16:39:48 UTC 2011
> 
> Modified Files:
>   src/external/bsd/cron/dist: cron.8 database.c pathnames.h
> 
> Log Message:
> process files in /etc/cron.d/

If we're magically skipping files, shouldn't we rather skip ".orig" instead of 
".rpmorig" etc?
 Thomas


Re: CVS commit: src/external/bsd/cron/dist

2011-10-12 Thread Christos Zoulas
In article <20111012181619.GA24188@marx.bitnet>,
Jukka Ruohonen   wrote:
>On Wed, Oct 12, 2011 at 12:39:48PM -0400, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Wed Oct 12 16:39:48 UTC 2011
>> 
>> Modified Files:
>>  src/external/bsd/cron/dist: cron.8 database.c pathnames.h
>> 
>> Log Message:
>> process files in /etc/cron.d/
>
>Not that I see much point in the whole commit, but what are these rpms and
>how they are related to NetBSD?

They are not, they were present in the original patch which came from
redhat, and I thought why not leave them in? The way they are done we
can use the code to exclude other names if we need to (.old, .orig, .save,
etc.) if we need to.

christos



Re: CVS commit: src/external/bsd/cron/dist

2011-10-12 Thread Jukka Ruohonen
On Wed, Oct 12, 2011 at 12:39:48PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Oct 12 16:39:48 UTC 2011
> 
> Modified Files:
>   src/external/bsd/cron/dist: cron.8 database.c pathnames.h
> 
> Log Message:
> process files in /etc/cron.d/

Not that I see much point in the whole commit, but what are these rpms and
how they are related to NetBSD?

- Jukka.

+Finally
+.Nm
+looks for crontabs in
+.Pa /etc/cron.d
+if it exists, and executes each file as a crontab. 
+.Pp
+When
+.Nm 
+looks in a directory for crontabs (either in
+.Pa /var/cron/tabs
+or
+.Pa /etc/cron.d )
+it will not process files that:
+.Bl -dash -compact -offset indent 
+.It
+Start with a
+.Sq \&.
+or a
+.Sq # .
+.It
+End with a
+.Sq ~
+or with
+.Dq .rpmsave , <- ???
+.Dq .rpmorig , <- ???
+or
+.Dq .rpmnew .  <- ???
+.It