Re: Rewrite of much of lpc/cmds.c ...

Garance A Drosihn <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <p05111736b929afa31b76@[128.113.24.47]>
At 5:52 PM -0400 6/8/02, Garance A Drosihn wrote:
>I figure I better stop at this point, before I rewrite the
>entire thing.  Here is an update which basically rewrites
>
>      abort    disable  enable  restart
>      start    stop     up


>I would like to commit this to current around June 15th.

Actually, since this update will leave the previous versions of
all the commands available, I'll probably commit it to current
by Wednesday the 12th.  I do have additional updates to
lpc/cmds.c which will be available by the weekend.  (they're
already written, actually, but I'm still checking them over).

>Here is the update:


>Index: lpc/cmds.c
>===================================================================


>  /*
>+ * kill an existing daemon and disable printing.
>+ */
>+void
>+abort_q(struct printer *pp)
>+{

I am still making a few cosmetic changes to this update (such as
rewording some comments), and in the process I did notice that
the abort_q routine needs a:

	if (setres >= 0) {
		seteuid(euid);
		upstat(pp, "printing disabled\n");
		seteuid(uid);
	}

at the end of the routine, to completely reproduce the behavior
of the previous implementation of abortpr.  So, I've added it...

-- 
Garance Alistair Drosehn            =   [email protected]
Senior Systems Programmer           or  [email protected]
Rensselaer Polytechnic Institute    or  [email protected]

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.