inn.conf: Support for `newsuser', `newsgrp' options (patch included)

Ivan Shmakov oneingray at gmail.com
Tue Dec 11 19:50:53 UTC 2007


	First of all, let us define the options and a few useful
	functions to do the UID/GID checking (to replace some of the
	checks scattered or even duplicated along the source.)

* include/innconf.h (struct innconf): New `newsuser' and `newsgrp'
  options.
* lib/innconf.c (config_table): Likewise.
* lib/Makefile (SOURCES): Added `newsuser.c'.
* include/newsuser.h: New file.
* lib/newsuser.c: New file.

	Now, we'd try to change some of the programs to actually use the
	functions (and options) we've just defined.

* expire.c (pwd.h): Don't include anymore.
  (newsuser.h): Include this one instead.
  (setuid_news): Removed.
  (main): Call `ensure_news_user_grp' instead of now removed
  `setuid_news'.
* expireover.c: Likewise.
  [Sans the `newsuser.h' change, which I've omitted by mistake.]
* makedbz.c: Likewise.
* makehistory.c: Likewise.

	Actually, the implementations of the removed setuid_news ()
	function were completely the same.  (Except for the commentary
	above the function, of which there were two versions.)

	I haven't tested the changes thoroughly, but the patched version
	of `makehistory' seems to work with something like:

newsuser: news2
newsgrp: news2

	in the second `inn.conf'.





More information about the inn-workers mailing list