Created attachment 152457 [details] 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
Auto-assigned to maintainer timur@FreeBSD.org
Thank you for the patch! I've committed it to the recent versions of samba4* with some small modifications. With regards, Timur Bakeyev