From kheuer@gwdu58.gwdg.de Thu Nov 18 06:46:47 1999
Return-Path: <kheuer@gwdu58.gwdg.de>
Received: from gwdu58.gwdg.de (gwdu58.gwdg.de [134.76.98.58])
	by hub.freebsd.org (Postfix) with ESMTP id EA2A2153FE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Nov 1999 06:46:44 -0800 (PST)
	(envelope-from kheuer@gwdu58.gwdg.de)
Received: (from kheuer@localhost)
	by gwdu58.gwdg.de (8.9.3/8.9.3) id PAA13461;
	Thu, 18 Nov 1999 15:46:40 +0100 (CET)
	(envelope-from kheuer)
Message-Id: <199911181446.PAA13461@gwdu58.gwdg.de>
Date: Thu, 18 Nov 1999 15:46:40 +0100 (CET)
From: kheuer@gwdg.de
Sender: kheuer@gwdu58.gwdg.de
Reply-To: kheuer@gwdg.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpc start bug fix 3.3-R
X-Send-Pr-Version: 3.2

>Number:         14975
>Category:       bin
>Synopsis:       lpc start subcmd doesn't start printing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 18 06:50:01 PST 1999
>Closed-Date:    Mon Jan 24 17:42:36 PST 2000
>Last-Modified:  Mon Jan 24 17:42:56 PST 2000
>Originator:     Konrad Heuer
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH
                 Goettingen, Am Fassberg, 37077 Goettingen, Germany
>Environment:

	

>Description:

	/usr/sbin/lpc is used to control print spooling. Different
	subcommands (disable, enable, start and stop) allow to close
	or to open both ends of printer queues (reject or accept
        jobs, print or keep jobs). The `lpc start queue' doesn't start
	printing although it says so which is a bug.
        

>How-To-Repeat:

	lpc up queue		# to make sure
	lpc stop queue		# stop printing
	lpc status queue	# check status
	lpc start queue		# looks good but
	lpc status queue	# nothing has changed, printing still disabled

>Fix:
	
*** cmds.c	Thu Nov 18 15:12:03 1999
--- cmds.c.orig	Sun Aug 29 17:43:18 1999
***************
*** 591,597 ****
  	 */
  	seteuid(euid);
  	if (enable && stat(lf, &stbuf) >= 0) {
! 		mode_t bits = (enable == 2 ? 0 : LFM_QUEUE_DIS);
  		if (chmod(lf, stbuf.st_mode & (LOCK_FILE_MODE | bits)) < 0)
  			printf("\tcannot enable printing\n");
  		else
--- 591,598 ----
  	 */
  	seteuid(euid);
  	if (enable && stat(lf, &stbuf) >= 0) {
! 		mode_t bits = (enable == 2 ? 0
! 			       : (LFM_PRINT_DIS | LFM_QUEUE_DIS));
  		if (chmod(lf, stbuf.st_mode & (LOCK_FILE_MODE | bits)) < 0)
  			printf("\tcannot enable printing\n");
  		else


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dillon 
State-Changed-When: Mon Jan 24 17:42:36 PST 2000 
State-Changed-Why:  
Fix committed to -3.x and -4.x 
>Unformatted:
