[net.bugs.4bsd] sendmail ignores 2nd and subsequent "-oMabcd" flags

matt@oddjob.UChicago.UUCP (Matt Crawford) (02/20/85)

Subject: sendmail ignores 2nd and subsequent "-oMabcd" flags
Index:	usr.lib/sendmail/src/readcf.c 4.2BSD

Description:
	When sendmail is given a command-line flag "-oMxXYZ" it
	calls setoption() with sticky == TRUE.  This means only
	one such flag will have an effect.
Repeat-By:
	Tweak your rmail.c to pass the flags "-oMrUUCP -oMsNEIGHBOR".
	Only the first will be honored.  Or, more directly,

		sendmail -d37.5 -oMrUUCP -oMsNBR-HOST ...

	The second -oM.. flag reports "(ignored)"
Fix:
	(Your line numbers will be different)

*** /tmp/,RCSt1020190	Mon Feb 18 18:20:34 1985
--- readcf.c	Mon Feb 18 18:15:17 1985
***************
*** 45,51
  **	Side Effects:
  **		Builds several internal tables.
  */
! /* $Header: readcf.c,v 1.2 84/12/09 17:14:39 bin Exp $
   * $Log:	readcf.c,v $
   * Revision 1.2  84/12/09  17:14:39  bin
   * Fix per K. Muller ...

--- 45,51 -----
  **	Side Effects:
  **		Builds several internal tables.
  */
! /* $Header: readcf.c,v 1.3 85/02/18 18:11:08 bin Exp $
   * $Log:	readcf.c,v $
   * Revision 1.3  85/02/18  18:11:08  bin
   * In setoption():  pseudo-option 'M' should never be sticky!
***************
*** 47,52
  */
  /* $Header: readcf.c,v 1.2 84/12/09 17:14:39 bin Exp $
   * $Log:	readcf.c,v $
   * Revision 1.2  84/12/09  17:14:39  bin
   * Fix per K. Muller ...
   * ...

--- 47,56 -----
  */
  /* $Header: readcf.c,v 1.3 85/02/18 18:11:08 bin Exp $
   * $Log:	readcf.c,v $
+  * Revision 1.3  85/02/18  18:11:08  bin
+  * In setoption():  pseudo-option 'M' should never be sticky!
+  * That would prevent, e.g., " -oMrUUCP -oMsneighbor ".
+  * 
   * Revision 1.2  84/12/09  17:14:39  bin
   * Fix per K. Muller ...
   * ...
***************
*** 633,639
  	else if (tTd(37, 1))
  		printf("\n");
  #endif DEBUG
! 	if (sticky)
  		setbitn(opt, StickyOpt);
  
  	if (getruid() == 0)

--- 637,643 -----
  	else if (tTd(37, 1))
  		printf("\n");
  #endif DEBUG
! 	if (sticky && opt != 'M')	/* 'M' should never be sticky ! */
  		setbitn(opt, StickyOpt);
  
  	if (getruid() == 0)
_____________________________________________________
Matt		University	crawford@anl-mcs.arpa
Crawford	of Chicago	ihnp4!oddjob!matt