Re: pledge csh nice = death

2015-10-19 Thread Theo de Raadt
> It looks like csh would currently need to pledge("id") in order for the
> builtin nice to work --- setpriority() is called in three places
> depending on how nice is invoked.  However, adding "id" to a shell
> seems a bit scary.
> 
> Would it be preferable to mark
> [SYS_setpriority] = PLEDGE_PROC | PLEDGE_ID?

I prefer that, and will do that.

However I'd like a semantic where priority can only be adjusted downwards.
semarie was talking about that as well.  I'll commit PLEDGE_PROC | PLEDGE_ID,
and hope you two write such a diff...



pledge csh nice = death

2015-10-18 Thread Ian McWilliam


Oct 19 11:55:52 ianm-openbsd /bsd: csh(29463): syscall 96 

Oct 19 11:55:52 ianm-openbsd /bsd: csh(6081): syscall 96 

Oct 19 11:55:52 ianm-openbsd /bsd: csh(18068): syscall 96 

Oct 19 11:57:14 ianm-openbsd /bsd: csh(31019): syscall 96 

Oct 19 11:57:14 ianm-openbsd /bsd: csh(20634): syscall 96 

Oct 19 11:57:14 ianm-openbsd /bsd: csh(6171): syscall 96

96 STD { int sys_setpriority(int which, id_t who, int prio); }

Some of my csh scripts set 'nice' priorities on some things they do.

Ian McWilliam