The branch, v4-15-test has been updated
       via  defbbe7127f s4/samba: POPT_COMMON_DAEMON
       via  c65fb0b0a0e winbindd: use POPT_COMMON_DAEMON
       via  3eef217a9da nmbd: use POPT_COMMON_DAEMON
       via  e1be4413c99 smbd: use POPT_COMMON_DAEMON
       via  476ed842726 lib/cmdline: restore pre-4.15 logging behaviour for 
daemons
       via  29c895c6d8a lib/cmdline: add POPT_COMMON_DAEMON daemon popt options
       via  4889512c705 s3: smbd: Fix openat_pathref_fsp() to cope with FIFO's 
in the filesystem.
       via  5ec6be2ae36 s3: smbd: Add fifo test for the DISABLE_OPATH case.
       via  b5b0471caf3 s3:winbind: Do not start if the priviliged socket path 
is too long
       via  915784c099c WHATSNEW: servers are now also logging to stderr at 
startup
       via  6bae027bf57 WHATSNEW: fix a typo
       via  51d64ce925b script/autobuild.py: Restore MIT ADDC tests against 
fl2008*
       via  57b266e23c4 s3: smbd: In create_conn_struct_cwd(), don't 
TALLOC_FREE() an unallocated pointer on error.
       via  2ed234deee3 s3: mdssvc: Correctly disconnect the VFS connection 
inside the mds_ctx destructor.
       via  cf4845f9b35 winbind: ensure wb_parent_idmap_setup_send() gets 
called in winbindd_allocate_uid_send()
       via  591bd2f3405 winbindd: call wb_parent_idmap_setup_send() in 
wb_queryuser_send()
       via  16306431a24 registry: check for running as root in clustering mode
       via  189bb79ac74 s3/lib/dbwrap: check if global_messaging_context() 
succeeded
       via  19485894d4b vfs_gpfs: deal with pathrefs fsps in 
smbd_gpfs_set_times()
       via  a0fe4423b8e lib/gpfswrap: add gpfs_set_times_path() wrapper
       via  85e5508c4d9 vfs_gpfs: remove ENOSYS fallback from vfs_gpfs_fntimes()
       via  f626ffdf6d5 vfs_gpfs: pass fsp to smbd_gpfs_set_times()
       via  3fe4d78f021 vfs_gpfs: deal with pathref fsps in vfs_gpfs_fntimes()
       via  45a63783526 vfs_gpfs: add sys_proc_fd_path() fallback to 
vfs_gpfs_fset_dos_attributes()
       via  e07c7110e55 vfs_gpfs: remove ENOSYS fallback from 
vfs_gpfs_fset_dos_attributes()
       via  ee741bcc44c vfs_gpfs: add path based fallback for 
gpfswrap_fstat_x() on pathref handles
       via  896a92e0382 vfs_gpfs: check for O_PATH support in gpfswrap_fstat_x()
       via  3db79fdfd61 vfs_gpfs: make vfs_gpfs_connect() a no-op on IPC shares
       via  81fa1a65849 vfs_gpfs: don't check for struct gpfs_config_data in 
vfs_gpfs_[l]stat()
       via  f171810b970 vfs_gpfs: call SMB_VFS_NEXT_CONNECT() before running 
some module initialization code
       via  5b80738ec02 smbd: avoid calling creating a pathref in 
smb_set_file_dosmode()
      from  8cc118dacc9 VERSION: Bump version up to 4.15.0rc5...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-15-test


- Log -----------------------------------------------------------------
commit defbbe7127fde7c73485b8dea18eb2543cda7973
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 14:04:22 2021 +0200

    s4/samba: POPT_COMMON_DAEMON
    
    Note: this also changes logging to go to stderr instead of stdout which is 
the
    same behaviour as smbd, nmbd and winbindd (starting with 4.15).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    RN: smbd/winbindd started in daemon mode generate output on stderr/stdout
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Mon Sep  6 14:23:15 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 28686f8713958726085bd38a0889aa7725c95371)
    
    Autobuild-User(v4-15-test): Jule Anger <jan...@samba.org>
    Autobuild-Date(v4-15-test): Mon Sep  6 20:17:51 UTC 2021 on sn-devel-184

commit c65fb0b0a0e2867c0656bb5a84606f70d02dbe65
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 12:25:00 2021 +0200

    winbindd: use POPT_COMMON_DAEMON
    
    Note: this also changes logging to go to stderr instead of stdout which is 
the
    same behaviour as smbd and nmbd (starting with 4.15).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 9d82454cdfc2b4b8007c7b54b3afd5686f49be19)

commit 3eef217a9daba415774680b4f4c0bf1188909edd
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 12:14:19 2021 +0200

    nmbd: use POPT_COMMON_DAEMON
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit a20f63b384750d389aeafd4bd5e229aed72cb271)

commit e1be4413c990f75f7efe9dc2c62a86646f2932d4
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 07:33:39 2021 +0200

    smbd: use POPT_COMMON_DAEMON
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit ae22442db437061aada6427adde205cd13f1d202)

commit 476ed842726a77cd16a2dafd4dfbc987a12b6cfe
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 07:28:45 2021 +0200

    lib/cmdline: restore pre-4.15 logging behaviour for daemons
    
    For servers ensure logging is configured to go to a logfile unless in
    interactive mode by calling setup_logging() before lp_load_global() is
    called.
    
    In 4.14 servers had the chance to call setup_logging(getprogname(),
    DEBUG_FILE) before they called lp_load_*() explicitly in the server.
    
    Now in 4.15 lp_load_*() is called internally when parsing the command
    line arguments triggered by the server running the poptGetNextOpt()
    loop, so it's too late when the server calls
    setup_logging(getprogname(), DEBUG_FILE) as lots of debugging from
    lp_load_()* was already written to DEBUG_DEFAULT_STDERR.
    
    Note that there's a chicken and egg problem *within* this patchset:
    this change here breaks stdout logging for servers until the servers
    are converted to use the new POPT_COMMON_DAEMON. The only way to
    address that would be squashing all changes into one patchset, but for
    the sake of reviewability (is that an actual english word? :)) I chose
    to split the changes.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 877183ac0b57f5b2902446e41bb6ab3191f84fa6)

commit 29c895c6d8ab5360f7d6e2e536b7b3ddf9656f3b
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Sep 3 07:22:18 2021 +0200

    lib/cmdline: add POPT_COMMON_DAEMON daemon popt options
    
    Note: interactive=true implies fork=false. This matches the semantics
    that currently 3/4 daemons implement manually.
    
    Not used so far, no change in behaviour.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit aaa3c6a4132d2e739958e168e7dc3e78dfa4a72e)

commit 4889512c705169468dee4bba85abfef93b3fcf03
Author: Jeremy Allison <j...@samba.org>
Date:   Thu Sep 2 14:40:53 2021 -0700

    s3: smbd: Fix openat_pathref_fsp() to cope with FIFO's in the filesystem.
    
    Remove skip test for the DISABLE_OPATH case.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14816
    RN: Fix pathref open of a filesystem fifo in the DISABLE_OPATH build
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Mon Sep  6 09:51:54 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 2f2c53c4f8f59a497bc33a24e5e0fc15ea076876)

commit 5ec6be2ae364febd7be36051dd72126708544e4c
Author: Jeremy Allison <j...@samba.org>
Date:   Thu Sep 2 15:32:27 2021 -0700

    s3: smbd: Add fifo test for the DISABLE_OPATH case.
    
    Currently we hang when trying to list a directory
    containing a fifo when configured with DISABLE_OPATH.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14816
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    (cherry picked from commit a54d9ffc87ebe602a0e7c48e35643ed2ff1a00bc)

commit b5b0471caf3e82c2ce9555c631ab802d7b28fe26
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Aug 11 12:07:57 2021 +0200

    s3:winbind: Do not start if the priviliged socket path is too long
    
    https://bugzilla.samba.org/show_bug.cgi?id=14792
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit 45f6bf1824f229dd138280eed1fff61a1e291897)

commit 915784c099c6f84eb5221de75171b18bfc577570
Author: Ralph Boehme <s...@samba.org>
Date:   Sun Sep 5 14:13:58 2021 +0200

    WHATSNEW: servers are now also logging to stderr at startup
    
    Signed-off-by: Ralph Boehme <s...@samba.org>

commit 6bae027bf5723010ec7293815c64a0eac0fde6c5
Author: Ralph Boehme <s...@samba.org>
Date:   Sun Sep 5 14:10:34 2021 +0200

    WHATSNEW: fix a typo
    
    singing -> signing :)
    
    Signed-off-by: Ralph Boehme <s...@samba.org>

commit 51d64ce925b628ac6f540a714fe36e28d4a61992
Author: Andrew Bartlett <abart...@samba.org>
Date:   Wed Sep 1 09:40:08 2021 +1200

    script/autobuild.py: Restore MIT ADDC tests against fl2008*
    
    Commit 7387da74e6f0e33de5f80b9a5e59f268541f52cd incorrectly
    ran the fl2000dc and fl2003dc tests twice, rather than the
    fl2008dc and fl2008r2dc tests in samba-ad-dc-4b-mitkrb5.
    
    (Now ad-dc-mit-4b)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14815
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
    
    Autobuild-User(master): Douglas Bagnall <dbagn...@samba.org>
    Autobuild-Date(master): Thu Sep  2 05:56:12 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 40b65fcb5830c6168a3032eb12bb4c8acc940bb3)
    
    RN: A subset of tests from Samba's selftest system were not being run, 
while others were run twice.

commit 57b266e23c459c8d0675ec17c8a5275f9c797781
Author: Jeremy Allison <j...@samba.org>
Date:   Mon Aug 23 17:42:40 2021 -0700

    s3: smbd: In create_conn_struct_cwd(), don't TALLOC_FREE() an unallocated 
pointer on error.
    
    Just return the status - if create_conn_struct_as_root() fails
    the connection struct never gets returned.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14809
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Wed Aug 25 17:09:23 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 857045f3a236dea125200dd09279d677e513682b)

commit 2ed234deee381cd15d7b7867136c5bbd78f5448c
Author: Jeremy Allison <j...@samba.org>
Date:   Mon Aug 23 17:40:42 2021 -0700

    s3: mdssvc: Correctly disconnect the VFS connection inside the mds_ctx 
destructor.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14809
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    (cherry picked from commit b4d8c62c4e8191e05fd03dd096a0bc989e224ed3)

commit cf4845f9b35d8b6706f474d8a7b09c0151367985
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Aug 20 15:04:49 2021 +0200

    winbind: ensure wb_parent_idmap_setup_send() gets called in 
winbindd_allocate_uid_send()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14804
    RN: winbindd can crash because idmap child state is not fully initialized
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@samba.org>
    Autobuild-Date(master): Thu Sep  2 15:20:06 UTC 2021 on sn-devel-184
    
    (cherry picked from commit d0f6d54354b02f5591706814fbd1e4844788fdfa)

commit 591bd2f340519ec5354c18031436e0d9dba63f5d
Author: Ralph Boehme <s...@samba.org>
Date:   Tue Aug 31 17:04:56 2021 +0200

    winbindd: call wb_parent_idmap_setup_send() in wb_queryuser_send()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14804
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 39c2ec72cb77945c3eb611fb1d7d7e9aad52bdfd)

commit 16306431a242b87a91d0c4b7ff874e51091d2bd9
Author: Ralph Boehme <s...@samba.org>
Date:   Sat Aug 7 10:52:28 2021 +0000

    registry: check for running as root in clustering mode
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787
    RN:  net conf list crashes when run as normal user
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Tue Aug 17 11:23:15 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 4809f4a6ee971bcd9767839c729b636b7582fc02)

commit 189bb79ac74f79b3a3de4a3577341de63206f752
Author: Ralph Boehme <s...@samba.org>
Date:   Sat Aug 7 10:51:38 2021 +0000

    s3/lib/dbwrap: check if global_messaging_context() succeeded
    
    The subsequent messaging_ctdb_connection() will fail an assert if messaging 
is
    not up and running, maybe it's a bit better to add a check if
    global_messaging_context() actually succeeded.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    (cherry picked from commit fd19cae8d2f21977d8285efd3f29e2b480d241e9)

commit 19485894d4b3b7e9f806434c686e880a94c8069b
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Aug 5 12:08:00 2021 +0200

    vfs_gpfs: deal with pathrefs fsps in smbd_gpfs_set_times()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Thu Aug 26 20:08:51 UTC 2021 on sn-devel-184
    
    (cherry picked from commit fead05a45556993b80a84fe9bb07b10debb4ae62)

commit a0fe4423b8e2fa9396a293910028ac4b53d81ec3
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Aug 5 12:05:16 2021 +0200

    lib/gpfswrap: add gpfs_set_times_path() wrapper
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 93a48399f427d114df63b434e7fcddc62a1d9ce5)

commit 85e5508c4d9a040050e41e6667346bc7112fd012
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Aug 13 11:55:16 2021 +0200

    vfs_gpfs: remove ENOSYS fallback from vfs_gpfs_fntimes()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 1bbdb81899be6c1da6fa9a63bf16a00401e09399)

commit f626ffdf6d5a35e1c9c8e82e2dc9315a67100fa1
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Aug 5 11:58:58 2021 +0200

    vfs_gpfs: pass fsp to smbd_gpfs_set_times()
    
    No change in behaviour. Prepares for dealing with pathref fsps in
    smbd_gpfs_set_times().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 9a237e168a4bbd5665bd40d521506ca3a6825198)

commit 3fe4d78f0217fb7d103a529504b6cad96c48c100
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Aug 5 11:55:30 2021 +0200

    vfs_gpfs: deal with pathref fsps in vfs_gpfs_fntimes()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 443608ee8122a2c17258db8dca9885bb524957af)

commit 45a63783526e48797689c1df0a5657fab9718fb8
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Jul 1 16:08:02 2021 +0200

    vfs_gpfs: add sys_proc_fd_path() fallback to vfs_gpfs_fset_dos_attributes()
    
    gpfs_set_winattrs() is a modifying operation, my expectation thus is that 
it is
    not allowed on pathref (O_PATH) handles even though a recent Linux kernel 
commit
    44a3b87444058b2cb055092cdebc63858707bf66 allowed calling utimensat() on 
pathref
    handles.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    RN: Some VFS operations on pathref (O_PATH) handles fail on GPFS
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 882a466ea5f45e5e2197f2408ccd560383e13c3f)

commit e07c7110e55ed8cf282d84a995258d4652a8c29b
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Aug 13 11:39:05 2021 +0200

    vfs_gpfs: remove ENOSYS fallback from vfs_gpfs_fset_dos_attributes()
    
    This API call has existed for a long time, so we can safely assume that this
    always works.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Pair-Programmed-With: Christof Schmitt <c...@samba.org>
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Signed-off-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 3679f54f178ba6ddb940cc66f701e9b3a1dd543d)

commit ee741bcc44ca939b4d70b071fccb88ef52b435cd
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Jul 29 19:28:14 2021 +0200

    vfs_gpfs: add path based fallback for gpfswrap_fstat_x() on pathref handles
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit fde1b98143568fc816165502583f72e73b5d6b71)

commit 896a92e0382bcc19d72e2a89ba5f8a4b1d16c770
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Jul 29 15:53:04 2021 +0200

    vfs_gpfs: check for O_PATH support in gpfswrap_fstat_x()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 730f8c49a9bc8333f0b722ad65e4e587421c21ec)

commit 3db79fdfd61c2a8884ed23f75bad179fd7c821cf
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Aug 6 12:05:44 2021 +0200

    vfs_gpfs: make vfs_gpfs_connect() a no-op on IPC shares
    
    We don't ever expect any filesystem IO operations to be called on an IPC 
shares,
    so there's no need to initialize the module here.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 1a3ac7a940fbb4ad8575ee3b0c56c9de2bf4b1f6)

commit 81fa1a65849e050c93a2998b7cc5069a3b68e9f3
Author: Stefan Metzmacher <me...@samba.org>
Date:   Wed Aug 11 16:23:24 2021 +0200

    vfs_gpfs: don't check for struct gpfs_config_data in vfs_gpfs_[l]stat()
    
    This is unused and the config object won't be avilable for IPC$ anymore 
with the
    next commit.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 070dce224bbe190266682c5e362bc2b0ed798ecc)

commit f171810b970915cfe5dca8e325ad59df17d9c496
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Aug 6 12:03:38 2021 +0200

    vfs_gpfs: call SMB_VFS_NEXT_CONNECT() before running some module 
initialization code
    
    No change in behaviour. Prepares for a subsequent commit that checks for 
IPC shares.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit 145e739c440d39651d4f3d30682035ab868488ba)

commit 5b80738ec02fccde4d3eee34097a56e55deb8d18
Author: Ralph Boehme <s...@samba.org>
Date:   Fri Jul 30 15:17:44 2021 +0200

    smbd: avoid calling creating a pathref in smb_set_file_dosmode()
    
    We already have a fsp with a valid fsp->base_fsp if it's a stream.
    
    Also remove the struct smb_filename arg, it's not needed, the only caller
    already checks for a valid fsp.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
    (cherry picked from commit bcd6bed7b8611654a7e9752b258541f89414b020)

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                             |   7 +-
 lib/cmdline/cmdline.c                    |  80 +++++++++
 lib/cmdline/cmdline.h                    |  29 ++++
 lib/cmdline/cmdline_private.h            |   4 +
 lib/cmdline/cmdline_s3.c                 |  11 +-
 lib/util/gpfswrap.c                      |  14 ++
 lib/util/gpfswrap.h                      |   1 +
 script/autobuild.py                      |   4 +-
 source3/lib/dbwrap/dbwrap_open.c         |   4 +
 source3/modules/vfs_gpfs.c               | 268 ++++++++++++++++++++++++++-----
 source3/nmbd/nmbd.c                      | 103 +++---------
 source3/registry/reg_backend_db.c        |   9 ++
 source3/rpc_server/mdssvc/mdssvc.c       |   5 +
 source3/script/tests/test_fifo.sh        |  83 ++++++++++
 source3/selftest/tests.py                |   3 +
 source3/smbd/files.c                     |   4 +
 source3/smbd/msdfs.c                     |   7 +-
 source3/smbd/server.c                    | 112 ++++---------
 source3/smbd/trans2.c                    |  67 ++++----
 source3/winbindd/wb_queryuser.c          |  30 +++-
 source3/winbindd/winbindd.c              | 116 ++++++-------
 source3/winbindd/winbindd_allocate_uid.c |  44 ++++-
 source4/samba/server.c                   |  88 +++-------
 23 files changed, 701 insertions(+), 392 deletions(-)
 create mode 100755 source3/script/tests/test_fifo.sh


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 9b072788ad1..2c391cfe801 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -94,13 +94,14 @@ other, some options meant different in different tools.
 
 These should be stories of the past now. A new command line parser has been
 implemented with sanity checking. Also the command line interface has been
-simplified and provides better control for encryption, singing and kerberos.
+simplified and provides better control for encryption, signing and kerberos.
 
 Also several command line options have a smb.conf variable to control the
 default now.
 
-All tools are logging to stderr by default. You can use "--debug-stdout" to
-change the behavior.
+All tools are now logging to stderr by default. You can use "--debug-stdout" to
+change the behavior. All servers will log to stderr at early startup until 
logging
+is setup to go to a file by default.
 
 ### Common parser:
 
diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c
index a0a55f4dcfb..a299a229f69 100644
--- a/lib/cmdline/cmdline.c
+++ b/lib/cmdline/cmdline.c
@@ -28,6 +28,7 @@ static TALLOC_CTX *cmdline_mem_ctx;
 static struct loadparm_context *cmdline_lp_ctx;
 static struct cli_credentials *cmdline_creds;
 static samba_cmdline_load_config cmdline_load_config_fn;
+static struct samba_cmdline_daemon_cfg cmdline_daemon_cfg;
 
 /* PRIVATE */
 bool samba_cmdline_set_talloc_ctx(TALLOC_CTX *mem_ctx)
@@ -59,6 +60,10 @@ bool samba_cmdline_init_common(TALLOC_CTX *mem_ctx)
                return false;
        }
 
+       cmdline_daemon_cfg = (struct samba_cmdline_daemon_cfg) {
+               .fork = true,
+       };
+
        fault_setup();
 
        /*
@@ -112,6 +117,11 @@ struct cli_credentials *samba_cmdline_get_creds(void)
        return cmdline_creds;
 }
 
+struct samba_cmdline_daemon_cfg *samba_cmdline_get_daemon_cfg(void)
+{
+       return &cmdline_daemon_cfg;
+}
+
 void samba_cmdline_burn(int argc, char *argv[])
 {
        bool found = false;
@@ -1134,6 +1144,73 @@ static struct poptOption popt_common_version[] = {
        POPT_TABLEEND
 };
 
+/**********************************************************
+ * DAEMON POPT
+ **********************************************************/
+
+static void popt_daemon_callback(poptContext ctx,
+                                enum poptCallbackReason reason,
+                                const struct poptOption *opt,
+                                const char *arg,
+                                const void *data)
+{
+       switch(opt->val) {
+       case OPT_DAEMON:
+               cmdline_daemon_cfg.daemon = true;
+               break;
+       case OPT_INTERACTIVE:
+               cmdline_daemon_cfg.interactive = true;
+               cmdline_daemon_cfg.fork = false;
+               break;
+       case OPT_FORK:
+               cmdline_daemon_cfg.fork = false;
+               break;
+       case OPT_NO_PROCESS_GROUP:
+               cmdline_daemon_cfg.no_process_group = true;
+               break;
+       }
+}
+
+static struct poptOption popt_common_daemon[] = {
+       {
+               .argInfo    = POPT_ARG_CALLBACK,
+               .arg        = (void *)popt_daemon_callback
+       },
+       {
+               .longName   = "daemon",
+               .shortName  = 'D',
+               .argInfo    = POPT_ARG_NONE,
+               .arg        = NULL,
+               .val        = OPT_DAEMON,
+               .descrip    = "Become a daemon (default)" ,
+       },
+       {
+               .longName   = "interactive",
+               .shortName  = 'i',
+               .argInfo    = POPT_ARG_NONE,
+               .arg        = NULL,
+               .val        = OPT_INTERACTIVE,
+               .descrip    = "Run interactive (not a daemon) and log to 
stdout",
+       },
+       {
+               .longName   = "foreground",
+               .shortName  = 'F',
+               .argInfo    = POPT_ARG_NONE,
+               .arg        = NULL,
+               .val        = OPT_FORK,
+               .descrip    = "Run daemon in foreground (for daemontools, 
etc.)",
+       },
+       {
+               .longName   = "no-process-group",
+               .shortName  = '\0',
+               .argInfo    = POPT_ARG_NONE,
+               .arg        = NULL,
+               .val        = OPT_NO_PROCESS_GROUP,
+               .descrip    = "Don't create a new process group" ,
+       },
+       POPT_TABLEEND
+};
+
 /**********************************************************
  * LEGACY S3 POPT
  **********************************************************/
@@ -1270,6 +1347,9 @@ struct poptOption *samba_cmdline_get_popt(enum 
smb_cmdline_popt_options opt)
        case SAMBA_CMDLINE_POPT_OPT_VERSION:
                return popt_common_version;
                break;
+       case SAMBA_CMDLINE_POPT_OPT_DAEMON:
+               return popt_common_daemon;
+               break;
        case SAMBA_CMDLINE_POPT_OPT_SAMBA_LDB:
                return popt_common_samba_ldb;
                break;
diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h
index 3c0c9e8c18d..1f85da0099e 100644
--- a/lib/cmdline/cmdline.h
+++ b/lib/cmdline/cmdline.h
@@ -46,11 +46,19 @@ enum smb_cmdline_popt_options {
        SAMBA_CMDLINE_POPT_OPT_CONNECTION,
        SAMBA_CMDLINE_POPT_OPT_CREDENTIALS,
        SAMBA_CMDLINE_POPT_OPT_VERSION,
+       SAMBA_CMDLINE_POPT_OPT_DAEMON,
        SAMBA_CMDLINE_POPT_OPT_SAMBA_LDB,
        SAMBA_CMDLINE_POPT_OPT_LEGACY_S3,
        SAMBA_CMDLINE_POPT_OPT_LEGACY_S4,
 };
 
+struct samba_cmdline_daemon_cfg {
+       bool daemon;
+       bool interactive;
+       bool fork;
+       bool no_process_group;
+};
+
 /**
  * @brief Initialize the commandline interface for parsing options.
  *
@@ -114,6 +122,15 @@ struct cli_credentials *samba_cmdline_get_creds(void);
  */
 struct poptOption *samba_cmdline_get_popt(enum smb_cmdline_popt_options opt);
 
+/**
+ * @brief Get a pointer to the poptOptions for daemons
+ *
+ * @return A pointer to the daemon options
+ *
+ * @see POPT_COMMON_DAEMON
+ */
+struct samba_cmdline_daemon_cfg *samba_cmdline_get_daemon_cfg(void);
+
 /**
  * @brief Burn secrets on the command line.
  *
@@ -249,6 +266,18 @@ poptContext samba_popt_get_context(const char * name,
        .descrip    = "Version options:", \
        .argDescrip = NULL },
 
+/**
+ * @brief A popt structure for daemon options.
+ */
+#define POPT_COMMON_DAEMON { \
+       .longName   = NULL, \
+       .shortName  = '\0', \
+       .argInfo    = POPT_ARG_INCLUDE_TABLE, \
+       .arg        = samba_cmdline_get_popt(SAMBA_CMDLINE_POPT_OPT_DAEMON), \
+       .val        = 0, \
+       .descrip    = "Daemon options:", \
+       .argDescrip = NULL },
+
 /**
  * @brief A popt structure for common samba options.
  */
diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h
index 2261e753447..b1584e020dc 100644
--- a/lib/cmdline/cmdline_private.h
+++ b/lib/cmdline/cmdline_private.h
@@ -34,6 +34,10 @@ enum {
        OPT_USE_KERBEROS_CCACHE,
        OPT_USE_WINBIND_CCACHE,
        OPT_CLIENT_PROTECTION,
+       OPT_DAEMON,
+       OPT_INTERACTIVE,
+       OPT_FORK,
+       OPT_NO_PROCESS_GROUP,
 };
 
 typedef bool (*samba_cmdline_load_config)(void);
diff --git a/lib/cmdline/cmdline_s3.c b/lib/cmdline/cmdline_s3.c
index 70fd768a648..1f8d9ed5eb5 100644
--- a/lib/cmdline/cmdline_s3.c
+++ b/lib/cmdline/cmdline_s3.c
@@ -55,10 +55,19 @@ static bool _samba_cmdline_load_config_s3(void)
        case SAMBA_CMDLINE_CONFIG_CLIENT:
                ok = lp_load_client(config_file);
                break;
-       case SAMBA_CMDLINE_CONFIG_SERVER:
+        case SAMBA_CMDLINE_CONFIG_SERVER:
+       {
+               const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg =
+                       samba_cmdline_get_daemon_cfg();
+
+               if (!cmdline_daemon_cfg->interactive) {
+                       setup_logging(getprogname(), DEBUG_FILE);
+               }
+
                ok = lp_load_global(config_file);
                break;
        }
+       }
 
        if (!ok) {
                fprintf(stderr,
diff --git a/lib/util/gpfswrap.c b/lib/util/gpfswrap.c
index c348ed7c5b8..5cf6d2148e7 100644
--- a/lib/util/gpfswrap.c
+++ b/lib/util/gpfswrap.c
@@ -39,6 +39,9 @@ static int (*gpfs_get_winattrs_fn)(int fd, struct 
gpfs_winattr *attrs);
 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
 static int (*gpfs_lib_init_fn)(int flags);
 static int (*gpfs_set_times_fn)(int fd, int flags, gpfs_timestruc_t times[4]);
+static int (*gpfs_set_times_path_fn)(char *path,
+                                    int flags,
+                                    gpfs_timestruc_t times[4]);
 static int (*gpfs_quotactl_fn)(const char *pathname,
                               int cmd,
                               int id,
@@ -77,6 +80,7 @@ int gpfswrap_init(void)
        gpfs_ftruncate_fn             = dlsym(l, "gpfs_ftruncate");
        gpfs_lib_init_fn              = dlsym(l, "gpfs_lib_init");
        gpfs_set_times_fn             = dlsym(l, "gpfs_set_times");
+       gpfs_set_times_path_fn        = dlsym(l, "gpfs_set_times_path");
        gpfs_quotactl_fn              = dlsym(l, "gpfs_quotactl");
        gpfs_init_trace_fn            = dlsym(l, "gpfs_init_trace");
        gpfs_query_trace_fn           = dlsym(l, "gpfs_query_trace");
@@ -213,6 +217,16 @@ int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t 
times[4])
        return gpfs_set_times_fn(fd, flags, times);
 }
 
+int gpfswrap_set_times_path(char *path, int flags, gpfs_timestruc_t times[4])
+{
+       if (gpfs_set_times_path_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       return gpfs_set_times_path_fn(path, flags, times);
+}
+
 int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp)
 {
        if (gpfs_quotactl_fn == NULL) {
diff --git a/lib/util/gpfswrap.h b/lib/util/gpfswrap.h
index 138e6ec696e..764cf686d2e 100644
--- a/lib/util/gpfswrap.h
+++ b/lib/util/gpfswrap.h
@@ -44,6 +44,7 @@ int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs);
 int gpfswrap_ftruncate(int fd, gpfs_off64_t length);
 int gpfswrap_lib_init(int flags);
 int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4]);
+int gpfswrap_set_times_path(char *path, int flags, gpfs_timestruc_t times[4]);
 int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp);
 int gpfswrap_init_trace(void);
 int gpfswrap_query_trace(void);
diff --git a/script/autobuild.py b/script/autobuild.py
index c554c331da4..b1dcece0093 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -689,8 +689,8 @@ tasks = {
         "sequence": [
             ("random-sleep", random_sleep(1, 1)),
             ("test", make_test(include_envs=[
-            "fl2000dc",
-            "fl2003dc",
+            "fl2008dc",
+            "fl2008r2dc",
             ])),
             ("lcov", LCOV_CMD),
             ("check-clean-tree", CLEAN_SOURCE_TREE_CMD),
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index 1d8c40af75e..52c8a94aeff 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -149,6 +149,10 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
                         * to be initialized.
                         */
                        msg_ctx = global_messaging_context();
+                       if (msg_ctx == NULL) {
+                               DBG_ERR("Failed to initialize messaging\n");
+                               return NULL;
+                       }
 
                        conn = messaging_ctdb_connection();
                        if (conn == NULL) {
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d74bc43db0e..4d1cfa6075a 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -55,6 +55,9 @@ struct gpfs_config_data {
        bool acl;
        bool settimes;
        bool recalls;
+       struct {
+               bool gpfs_fstat_x;
+       } pathref_ok;
 };
 
 struct gpfs_fsp_extension {
@@ -1471,6 +1474,9 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct 
vfs_handle_struct *handle,
                                             uint32_t *dosmode)
 {
        struct gpfs_config_data *config;
+       int fd = fsp_get_pathref_fd(fsp);
+       char buf[PATH_MAX];
+       const char *p = NULL;
        struct gpfs_iattr64 iattr = { };
        unsigned int litemask;
        struct timespec ts;
@@ -1486,7 +1492,22 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct 
vfs_handle_struct *handle,
                return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
        }
 
-       ret = gpfswrap_fstat_x(fsp_get_pathref_fd(fsp), &litemask, &iattr, 
sizeof(iattr));
+       if (fsp->fsp_flags.is_pathref && !config->pathref_ok.gpfs_fstat_x) {
+               if (fsp->fsp_flags.have_proc_fds) {
+                       p = sys_proc_fd_path(fd, buf, sizeof(buf));
+                       if (p == NULL) {
+                               return NT_STATUS_NO_MEMORY;
+                       }
+               } else {
+                       p = fsp->fsp_name->base_name;
+               }
+       }
+
+       if (p != NULL) {
+               ret = gpfswrap_stat_x(p, &litemask, &iattr, sizeof(iattr));
+       } else {
+               ret = gpfswrap_fstat_x(fd, &litemask, &iattr, sizeof(iattr));
+       }
        if (ret == -1 && errno == ENOSYS) {
                return SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, dosmode);
        }
@@ -1503,8 +1524,17 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct 
vfs_handle_struct *handle,
 
                set_effective_capability(DAC_OVERRIDE_CAPABILITY);
 
-               ret = gpfswrap_fstat_x(fsp_get_pathref_fd(fsp), &litemask,
-                                      &iattr, sizeof(iattr));
+               if (p != NULL) {
+                       ret = gpfswrap_stat_x(p,
+                                             &litemask,
+                                             &iattr,
+                                             sizeof(iattr));
+               } else {
+                       ret = gpfswrap_fstat_x(fd,
+                                              &litemask,
+                                              &iattr,
+                                              sizeof(iattr));
+               }
                if (ret == -1) {
                        saved_errno = errno;
                }
@@ -1554,16 +1584,48 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct 
vfs_handle_struct *handle,
        }
 
        attrs.winAttrs = vfs_gpfs_dosmode_to_winattrs(dosmode);
-       ret = gpfswrap_set_winattrs(fsp_get_io_fd(fsp),
-                                   GPFS_WINATTR_SET_ATTRS, &attrs);
 
-       if (ret == -1 && errno == ENOSYS) {
-               return SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle, fsp, dosmode);
+       if (!fsp->fsp_flags.is_pathref) {
+               ret = gpfswrap_set_winattrs(fsp_get_io_fd(fsp),
+                                           GPFS_WINATTR_SET_ATTRS, &attrs);
+               if (ret == -1) {
+                       DBG_WARNING("Setting winattrs failed for %s: %s\n",
+                                   fsp_str_dbg(fsp), strerror(errno));
+                       return map_nt_error_from_unix(errno);
+               }
+               return NT_STATUS_OK;
        }
 
+       if (fsp->fsp_flags.have_proc_fds) {
+               int fd = fsp_get_pathref_fd(fsp);
+               const char *p = NULL;
+               char buf[PATH_MAX];
+
+               p = sys_proc_fd_path(fd, buf, sizeof(buf));
+               if (p == NULL) {
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               ret = gpfswrap_set_winattrs_path(p,
+                                                GPFS_WINATTR_SET_ATTRS,
+                                                &attrs);
+               if (ret == -1) {
+                       DBG_WARNING("Setting winattrs failed for [%s][%s]: 
%s\n",
+                                   p, fsp_str_dbg(fsp), strerror(errno));
+                       return map_nt_error_from_unix(errno);
+               }
+               return NT_STATUS_OK;
+       }
+
+       /*
+        * This is no longer a handle based call.
+        */
+       ret = gpfswrap_set_winattrs_path(fsp->fsp_name->base_name,
+                                        GPFS_WINATTR_SET_ATTRS,
+                                        &attrs);
        if (ret == -1) {
-               DBG_WARNING("Setting winattrs failed for %s: %s\n",
-                           fsp->fsp_name->base_name, strerror(errno));
+               DBG_WARNING("Setting winattrs failed for [%s]: %s\n",
+                           fsp_str_dbg(fsp), strerror(errno));
                return map_nt_error_from_unix(errno);
        }
 
@@ -1616,11 +1678,6 @@ static int vfs_gpfs_stat(struct vfs_handle_struct 
*handle,
                         struct smb_filename *smb_fname)
 {
        int ret;
-       struct gpfs_config_data *config;
-
-       SMB_VFS_HANDLE_GET_DATA(handle, config,
-                               struct gpfs_config_data,
-                               return -1);
 
        ret = SMB_VFS_NEXT_STAT(handle, smb_fname);
        if (ret == -1 && errno == EACCES) {
@@ -1635,11 +1692,6 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct 
*handle,
                          struct smb_filename *smb_fname)
 {
        int ret;
-       struct gpfs_config_data *config;
-
-       SMB_VFS_HANDLE_GET_DATA(handle, config,
-                               struct gpfs_config_data,
-                               return -1);
 
        ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname);
        if (ret == -1 && errno == EACCES) {
@@ -1662,7 +1714,8 @@ static void timespec_to_gpfs_time(struct timespec ts, 
gpfs_timestruc_t *gt,
        }
 }
 
-static int smbd_gpfs_set_times(int fd, char *path, struct smb_file_time *ft)
+static int smbd_gpfs_set_times(struct files_struct *fsp,
+                              struct smb_file_time *ft)
 {
        gpfs_timestruc_t gpfs_times[4];
        int flags = 0;
@@ -1679,14 +1732,45 @@ static int smbd_gpfs_set_times(int fd, char *path, 
struct smb_file_time *ft)
                return 0;
        }
 
-       rc = gpfswrap_set_times(fd, flags, gpfs_times);
+       if (!fsp->fsp_flags.is_pathref) {
+               rc = gpfswrap_set_times(fsp_get_io_fd(fsp), flags, gpfs_times);
+               if (rc != 0) {
+                       DBG_WARNING("gpfs_set_times(%s) failed: %s\n",
+                                   fsp_str_dbg(fsp), strerror(errno));
+               }
+               return rc;
+       }
+
+
+       if (fsp->fsp_flags.have_proc_fds) {
+               int fd = fsp_get_pathref_fd(fsp);
+               const char *p = NULL;
+               char buf[PATH_MAX];
+
+               p = sys_proc_fd_path(fd, buf, sizeof(buf));
+               if (p == NULL) {


-- 
Samba Shared Repository

Reply via email to