Bug 257188 - net/samba4*: samba_server service file force runs all daemons if called with 'onestart'
Summary: net/samba4*: samba_server service file force runs all daemons if called with ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Timur I. Bakeyev
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-14 16:57 UTC by Emrion
Modified: 2021-07-15 13:42 UTC (History)
6 users (show)

See Also:
linimon: maintainer-feedback? (timur)


Attachments
patch to get the same behavour with start or onestart command (1.50 KB, patch)
2021-07-14 17:00 UTC, Emrion
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emrion 2021-07-14 16:57:45 UTC
+++ This bug was initially created as a clone of Bug #209660 +++

This clause in /usr/local/etc/rc.d/samba_server (lines 120-122):

>     if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
>         force_run=yes
>     fi

forces nmbd and winbindd to be started regardless of the values of nmbd_enable and winbindd_enable in /etc/rc.conf.

If one wants to start samba_server manually (without having set samba_server_enable="YES") after boot they have no option but to use 'onestart' but then that will ignore disabling of nmbd and winbindd in rc.conf; even in situations where 'disable netbios = yes' is explicitly set in smb4.conf.

This leaves one with no option to start only smbd manually after boot without forcibly launching nmbd and winbindd which many not be desired in some scenarios.

This was checked with samba_server script shipped with samba41-4.1.22_2.
Comment 1 Emrion 2021-07-14 17:00:53 UTC
Created attachment 226466 [details]
patch to get the same behavour with start or onestart command
Comment 2 Emrion 2021-07-14 17:04:44 UTC
(In reply to Emrion from comment #1)
This patch is intended to be applied on /usr/local/etc/rc.d/samba_server