Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Feb 2015 21:52:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 197255] [PATCH] net/samba41: testparm_command in rc script doesn't use samba_server_config from rc.conf
Message-ID:  <bug-197255-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197255

            Bug ID: 197255
           Summary: [PATCH] net/samba41: testparm_command in rc script
                    doesn't use samba_server_config from rc.conf
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: timur@FreeBSD.org
          Reporter: guyyur@gmail.com
             Flags: maintainer-feedback?(timur@FreeBSD.org)
          Assignee: timur@FreeBSD.org

Created attachment 152457
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152457&action=edit
patch for samba_server.in

Description:
A samba_server_config statement in rc.conf is ignored and the default
is used by samba_server rc script because it specifies testparm_command
after samba_server_config is set to $samba_server_config_default and
before load_rc_config sets it from rc.conf.

Attached patch to:
1. move load_rc_config for "samba_server" to before
   checking samba_server_role.
2. move setting samba_server_config, testparm_command
   to after doing load_rc_config for "samba_server".
3. fix winbindd being started when winbindd_enable is unset and
   samba_server_idmap is not specified in config file.
   (comment at start of script "You need to enable winbindd separately")


# grep samba_server /etc/rc.conf
samba_server_enable="YES"
samba_server_config="/usr/local/etc/smb.conf"


# sh -x /usr/local/etc/rc.d/samba_server start
+ . /etc/rc.subr
+ : 28915
+ export RC_PID
+ [ -z '' ]
+ _rc_subr_loaded=YES
...
+ name=samba_server
+ rcvar=samba_server_enable
+ samba_server_config_default=/usr/local/etc/smb4.conf
+ samba_server_config=/usr/local/etc/smb4.conf
+ samba_server_configfile_arg=--configfile=/usr/local/etc/smb4.conf
+ testparm_command='/usr/local/bin/testparm --suppress-prompt --verbose
/usr/local/etc/smb4.conf'
...
+ load_rc_config samba_server
...
+ samba_server_enable=YES
+ samba_server_config=/usr/local/etc/smb.conf
...
+ [ winbindd = winbindd ]
+ /usr/local/bin/testparm --suppress-prompt --verbose /usr/local/etc/smb4.conf
'--parameter-name=idmap uid'
+ samba_server_idmap=''
+ [ -n '' ]
+ eval 'winbindd_enable=${winbindd_enable-YES}'
+ winbindd_enable=YES
+ eval 'winbindd_enable=${winbindd_enable:-NO}'
+ winbindd_enable=YES

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Auto-assigned to maintainer timur@FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197255-13>