From nobody@FreeBSD.org  Thu Aug 25 15:55:40 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EFE9D16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Aug 2005 15:55:39 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4A9DA43D49
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Aug 2005 15:55:36 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j7PFtZq5022484
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Aug 2005 15:55:35 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j7PFtZJR022483;
	Thu, 25 Aug 2005 15:55:35 GMT
	(envelope-from nobody)
Message-Id: <200508251555.j7PFtZJR022483@www.freebsd.org>
Date: Thu, 25 Aug 2005 15:55:35 GMT
From: "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: security/samhain WITH_RUNAS_USER defaults to daemon when building yule (WITH_SERVER)
X-Send-Pr-Version: www-2.3

>Number:         85291
>Category:       ports
>Synopsis:       security/samhain WITH_RUNAS_USER defaults to daemon when building yule (WITH_SERVER)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 25 16:00:42 GMT 2005
>Closed-Date:    Mon Aug 29 20:13:49 GMT 2005
>Last-Modified:  Mon Aug 29 20:13:49 GMT 2005
>Originator:     Brian A. Seklecki
>Release:        FreeBSD 5.3-RELEASE-p20 i386 GENERIC
>Organization:
Collaborative Fusion, Inc.
>Environment:
FreeBSD soundwave 5.3-RELEASE-p20 FreeBSD 5.3-RELEASE-p20 #0: Wed Jul 27 16:03:34 EDT 2005     root@soundwave.collaborativefusion.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
      The Makefile for ports/security/samhain states:

# WITH_RUNAS_USER:                                                                                                           
#       Whe building with "WITH_SERVER" defined, the username of the                                                         
#       account Yule will run as. Defaults to "yule".  

But WITH_RUNAS_USER isn't set to anything in the Makefile or anywhere else., so it defaults to 'daemon'.  This works fine until you enable --with-gpg and GPG fails permissions/ownership sanity checks on ~WITH_RUNAS_USER/.gnupg because 'daemon' and 'root' share a $HOME of /root.
>How-To-Repeat:
      Build samhain with WITH_GPG=true and WITH_SERVER=true
>Fix:
      1) WITH_RUNAS_USER could default to something
      2) If not, there should be an:

.if defined(WITH_GPG) && defined (WITH_SERVER) 

...that alerts the user or sets the WITH_RUNAS_USER to something other than daemon.
>Release-Note:
>Audit-Trail:

From: "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
To: bug-followup@FreeBSD.org, lavalamp@spiritual-machines.org
Cc:  
Subject: Re: ports/85291: security/samhain WITH_RUNAS_USER defaults to daemon
 when building yule (WITH_SERVER)
Date: Mon, 29 Aug 2005 11:55:52 -0400 (EDT)

 One more small tidbit:
 
 /usr/local/etc/samhainrc.sample is in PLIST.  It gets installed with an 
 invalid GID of 100.  It should be chgrp'd during post-install.  Files with 
 invalid / numerical GID/UIDs critical errors in Samhain's file checking 
 module anyway.
 
 ~BAS
State-Changed-From-To: open->closed 
State-Changed-By: vs 
State-Changed-When: Mon Aug 29 20:13:01 GMT 2005 
State-Changed-Why:  
Included in maintainer update in ports/85448. 
Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85291 
>Unformatted:
