kai/samba-autobuild/.git
13 months agoPEP8: fix E303: too many blank lines (2)
Joe Guo [Mon, 30 Jul 2018 06:21:11 +0000 (18:21 +1200)]
PEP8: fix E303: too many blank lines (2)

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E302: expected 2 blank lines, found 1
Joe Guo [Mon, 30 Jul 2018 06:20:39 +0000 (18:20 +1200)]
PEP8: fix E302: expected 2 blank lines, found 1

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E301: expected 1 blank line, found 0
Joe Guo [Mon, 30 Jul 2018 06:19:59 +0000 (18:19 +1200)]
PEP8: fix E301: expected 1 blank line, found 0

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E265: block comment should start with '# '
Joe Guo [Mon, 30 Jul 2018 06:19:49 +0000 (18:19 +1200)]
PEP8: fix E265: block comment should start with '# '

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E261: at least two spaces before inline comment
Joe Guo [Mon, 30 Jul 2018 06:19:33 +0000 (18:19 +1200)]
PEP8: fix E261: at least two spaces before inline comment

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E251: unexpected spaces around keyword / parameter equals
Joe Guo [Mon, 30 Jul 2018 06:19:21 +0000 (18:19 +1200)]
PEP8: fix E251: unexpected spaces around keyword / parameter equals

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E241: multiple spaces after ','
Joe Guo [Mon, 30 Jul 2018 06:19:11 +0000 (18:19 +1200)]
PEP8: fix E241: multiple spaces after ','

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E231: missing whitespace after ','
Joe Guo [Mon, 30 Jul 2018 06:19:05 +0000 (18:19 +1200)]
PEP8: fix E231: missing whitespace after ','

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E228: missing whitespace around modulo operator
Joe Guo [Mon, 30 Jul 2018 06:18:34 +0000 (18:18 +1200)]
PEP8: fix E228: missing whitespace around modulo operator

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E227: missing whitespace around bitwise or shift operator
Joe Guo [Mon, 30 Jul 2018 06:18:32 +0000 (18:18 +1200)]
PEP8: fix E227: missing whitespace around bitwise or shift operator

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E226: missing whitespace around arithmetic operator
Joe Guo [Mon, 30 Jul 2018 06:18:25 +0000 (18:18 +1200)]
PEP8: fix E226: missing whitespace around arithmetic operator

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E225: missing whitespace around operator
Joe Guo [Mon, 30 Jul 2018 06:18:03 +0000 (18:18 +1200)]
PEP8: fix E225: missing whitespace around operator

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E222: multiple spaces after operator
Joe Guo [Mon, 30 Jul 2018 06:17:44 +0000 (18:17 +1200)]
PEP8: fix E222: multiple spaces after operator

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E211: whitespace before '('
Joe Guo [Mon, 30 Jul 2018 06:17:15 +0000 (18:17 +1200)]
PEP8: fix E211: whitespace before '('

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E203: whitespace before ':'
Joe Guo [Mon, 30 Jul 2018 06:17:14 +0000 (18:17 +1200)]
PEP8: fix E203: whitespace before ':'

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E202: whitespace before ')'
Joe Guo [Mon, 30 Jul 2018 06:17:02 +0000 (18:17 +1200)]
PEP8: fix E202: whitespace before ')'

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E201: whitespace after '('
Joe Guo [Mon, 30 Jul 2018 06:16:43 +0000 (18:16 +1200)]
PEP8: fix E201: whitespace after '('

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E131: continuation line unaligned for hanging indent
Joe Guo [Mon, 30 Jul 2018 06:16:26 +0000 (18:16 +1200)]
PEP8: fix E131: continuation line unaligned for hanging indent

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E128: continuation line under-indented for visual indent
Joe Guo [Mon, 30 Jul 2018 06:16:12 +0000 (18:16 +1200)]
PEP8: fix E128: continuation line under-indented for visual indent

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E127: continuation line over-indented for visual indent
Joe Guo [Mon, 30 Jul 2018 06:15:34 +0000 (18:15 +1200)]
PEP8: fix E127: continuation line over-indented for visual indent

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E125: continuation line with same indent as next logical line
Joe Guo [Mon, 30 Jul 2018 06:14:45 +0000 (18:14 +1200)]
PEP8: fix E125: continuation line with same indent as next logical line

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E124: closing bracket does not match visual indentation
Joe Guo [Mon, 30 Jul 2018 06:14:43 +0000 (18:14 +1200)]
PEP8: fix E124: closing bracket does not match visual indentation

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E123: closing bracket does not match indentation of opening bracket's line
Joe Guo [Mon, 30 Jul 2018 06:14:37 +0000 (18:14 +1200)]
PEP8: fix E123: closing bracket does not match indentation of opening bracket's line

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E122: continuation line missing indentation or outdented
Joe Guo [Mon, 30 Jul 2018 06:14:21 +0000 (18:14 +1200)]
PEP8: fix E122: continuation line missing indentation or outdented

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E121: continuation line under-indented for hanging indent
Joe Guo [Mon, 30 Jul 2018 06:14:13 +0000 (18:14 +1200)]
PEP8: fix E121: continuation line under-indented for hanging indent

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E116: unexpected indentation (comment)
Joe Guo [Mon, 30 Jul 2018 06:14:03 +0000 (18:14 +1200)]
PEP8: fix E116: unexpected indentation (comment)

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E115: expected an indented block (comment)
Joe Guo [Mon, 30 Jul 2018 06:14:00 +0000 (18:14 +1200)]
PEP8: fix E115: expected an indented block (comment)

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E111: indentation is not a multiple of four
Joe Guo [Mon, 30 Jul 2018 06:13:57 +0000 (18:13 +1200)]
PEP8: fix E111: indentation is not a multiple of four

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: whitespace fixes in wintest.py
Joe Guo [Mon, 20 Aug 2018 23:47:07 +0000 (11:47 +1200)]
PEP8: whitespace fixes in wintest.py

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E101: indentation contains mixed spaces and tabs
Joe Guo [Mon, 30 Jul 2018 06:13:51 +0000 (18:13 +1200)]
PEP8: fix E101: indentation contains mixed spaces and tabs

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix W602: deprecated form of raising exception
Joe Guo [Mon, 30 Jul 2018 04:11:40 +0000 (16:11 +1200)]
PEP8: fix W602: deprecated form of raising exception

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix W601: .has_key() is deprecated, use 'in'
Joe Guo [Mon, 30 Jul 2018 04:43:51 +0000 (16:43 +1200)]
PEP8: fix W601: .has_key() is deprecated, use 'in'

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E731: do not assign a lambda expression, use a def
Joe Guo [Mon, 30 Jul 2018 04:35:43 +0000 (16:35 +1200)]
PEP8: fix E731: do not assign a lambda expression, use a def

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E714: test for object identity should be 'is not'
Joe Guo [Mon, 30 Jul 2018 03:45:18 +0000 (15:45 +1200)]
PEP8: fix E714: test for object identity should be 'is not'

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E713: test for membership should be 'not in'
Joe Guo [Mon, 30 Jul 2018 02:56:46 +0000 (14:56 +1200)]
PEP8: fix E713: test for membership should be 'not in'

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoPEP8: fix E271: multiple spaces after keyword
Joe Guo [Mon, 30 Jul 2018 03:42:42 +0000 (15:42 +1200)]
PEP8: fix E271: multiple spaces after keyword

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agovfs_fruit: Don't unlink the main file
Volker Lendecke [Tue, 7 Aug 2018 13:10:31 +0000 (15:10 +0200)]
vfs_fruit: Don't unlink the main file

The original fix for bug 13441 was missing a check that verifies that
fruit_ftruncate() is actually called on a stream.

Follow-up to

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Aug 23 15:28:48 CEST 2018 on sn-devel-144

13 months agotorture: Make sure that fruit_ftruncate only unlinks streams
Volker Lendecke [Tue, 7 Aug 2018 13:11:22 +0000 (15:11 +0200)]
torture: Make sure that fruit_ftruncate only unlinks streams

Follow-up to

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
13 months agos3: smbd: Ensure get_real_filename() copes with empty pathnames.
Jeremy Allison [Tue, 21 Aug 2018 19:05:34 +0000 (12:05 -0700)]
s3: smbd: Ensure get_real_filename() copes with empty pathnames.

Needed for vfs_glusterfs, as Gluster requires "." not '\0'.

Based on a fix from Anoop C S <anoopcs@redhat.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13585

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 22 21:50:41 CEST 2018 on sn-devel-144

13 months agolibads: Simplify parse_spn()
Volker Lendecke [Tue, 21 Aug 2018 19:22:42 +0000 (21:22 +0200)]
libads: Simplify parse_spn()

A few lines less and quite some bytes less .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 22 03:59:51 CEST 2018 on sn-devel-144

13 months agolibads: Fix an error path talloc leak
Volker Lendecke [Tue, 21 Aug 2018 19:19:49 +0000 (21:19 +0200)]
libads: Fix an error path talloc leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agodsdb: Fix a typo
Volker Lendecke [Tue, 21 Aug 2018 19:11:43 +0000 (21:11 +0200)]
dsdb: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agodsdb: Fix CID 1438461 Error handling issues (CHECKED_RETURN)
Volker Lendecke [Tue, 21 Aug 2018 19:41:05 +0000 (21:41 +0200)]
dsdb: Fix CID 1438461 Error handling issues (CHECKED_RETURN)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agolibgpo: Fix CID 1438462 Error handling issues (CHECKED_RETURN)
Volker Lendecke [Tue, 21 Aug 2018 19:38:01 +0000 (21:38 +0200)]
libgpo: Fix CID 1438462 Error handling issues (CHECKED_RETURN)

Yes, this creates a leak of "data", but the other error exits in this
function are the same.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agosmbd: Remove koplocks->contend_level2 callbacks
Volker Lendecke [Thu, 26 Jul 2018 11:08:06 +0000 (13:08 +0200)]
smbd: Remove koplocks->contend_level2 callbacks

This was only implemented by onefs in this way. If we get around to use
for example fanotify or something similar, we can either re-add them or
do it in a different way. For now, simplify the code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph B√∂hme <slow@samba.org>
Autobuild-Date(master): Wed Aug 22 00:57:31 CEST 2018 on sn-devel-144

13 months agotorture: Demonstrate the invalid lock order panic
Volker Lendecke [Mon, 6 Aug 2018 12:35:15 +0000 (14:35 +0200)]
torture: Demonstrate the invalid lock order panic

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13584

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 02:33:05 CEST 2018 on sn-devel-144

13 months agovfs_fruit: Fix a leak of "br_lck"
Volker Lendecke [Mon, 6 Aug 2018 12:33:34 +0000 (14:33 +0200)]
vfs_fruit: Fix a leak of "br_lck"

Fix a panic if fruit_access_check detects a locking conflict.

do_lock() returns a valid br_lck even in case of a locking conflict.
Not free'ing it leads to a invalid lock order panic later, because
"br_lck" corresponds to a dbwrap lock on brlock.tdb.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13584

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agopython: Fix print in dns_invalid.py
Andreas Schneider [Fri, 17 Aug 2018 10:06:38 +0000 (12:06 +0200)]
python: Fix print in dns_invalid.py

https://bugzilla.samba.org/show_bug.cgi?id=13580

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sat Aug 18 15:21:39 CEST 2018 on sn-devel-144

13 months agoctdb: calculate queue input buffer size correctly
Swen Schillig [Wed, 7 Mar 2018 12:54:45 +0000 (13:54 +0100)]
ctdb: calculate queue input buffer size correctly

The queue's input buffer is calculated in an iterative way.
This can result in a few back and forth jumping and
a few memory allocations and mem-free cycles.
This is very time consuming and not required, because the required
memory size can be calculated right away.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 18 04:58:05 CEST 2018 on sn-devel-144

13 months agoctdb: Replace calculation of bytes to read from socket by MIN() macro
Swen Schillig [Thu, 9 Aug 2018 07:15:36 +0000 (09:15 +0200)]
ctdb: Replace calculation of bytes to read from socket by MIN() macro

The calculation of the bytes to read from the socket can be done easier
by the usage of the common MIN() macro.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agos3: util: Do not take over stderr when there is no log file
Paulo Alcantara [Fri, 17 Aug 2018 14:30:16 +0000 (11:30 -0300)]
s3: util: Do not take over stderr when there is no log file

In case we don't have either a /var/log/samba directory, or pass a
non-existent log directory through '-l' option, all commands that are
daemonized with '-D' option hang when executed within a subshell.

An example on how to trigger that:

  # rm -r /var/log/samba
  # s=$(nmbd -D -s /etc/samba/smb.conf -l /foo123)
  (never returns)

So, when the above command is executed within a subshell the following
happens:

  (a) Parent shell creates a pipe, sets write side of it to fd 1
    (stdout), call read() on read-side fd, forks off a new child process
    and then executes nmbd in it.
  (b) nmbd sets up initial logging to go through fd 1 (stdout) by
    calling setup_logging(..., DEBUG_DEFAULT_STDOUT). 'state.fd' is now
    set to 1.
  (c) reopen_logs() is called by the first time which then calls
    reopen_logs_internal()
  (d) in reopen_logs_internal(), it attempts to create log.nmbd file in
    /foo123 directory and fails because directory doesn't exist.
  (e) Regardless whether the log file was created or not, it calls
    dup2(state.fd, 2) which dups fd 1 into fd 2.
  (f) At some point, fd 0 and 1 are closed and set to /dev/null

The problem with that is because parent shell in (a) is still blocked in
read() call and the new write side of the pipe is now fd 2 -- after
dup2() in (e) -- and remains unclosed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13578

Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 18 01:32:25 CEST 2018 on sn-devel-144

13 months agodbwrap: Clarify db_open_watched API
Volker Lendecke [Thu, 16 Aug 2018 09:25:54 +0000 (11:25 +0200)]
dbwrap: Clarify db_open_watched API

Point out in the API that "backend" talloc_moves into the watched
database.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 17 21:29:15 CEST 2018 on sn-devel-144

13 months agosmbd: Fix a few DEBUG statements
Volker Lendecke [Mon, 30 Jul 2018 11:00:22 +0000 (13:00 +0200)]
smbd: Fix a few DEBUG statements

%u is not necessarily correct for uint32_t, avoid casts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agodbwrap: Fix a typo
Volker Lendecke [Mon, 30 Jul 2018 14:29:58 +0000 (16:29 +0200)]
dbwrap: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
13 months agog_lock: Fix DEBUG messages
Volker Lendecke [Thu, 16 Aug 2018 09:34:36 +0000 (11:34 +0200)]
g_lock: Fix DEBUG messages

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agosmbd: Fix a typo
Volker Lendecke [Thu, 26 Jul 2018 15:56:31 +0000 (17:56 +0200)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agosmbd: Fix a typo
Volker Lendecke [Thu, 26 Jul 2018 10:43:30 +0000 (12:43 +0200)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agosmbd: Enhance debugging in set_file_size
Volker Lendecke [Tue, 7 Aug 2018 13:09:04 +0000 (15:09 +0200)]
smbd: Enhance debugging in set_file_size

I've stumbled over a case where VFS_FTRUNCATE wasn't called due to an
unchanged size. Make that easier to detect. Also, get rid of an ancient
cast to (double).

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 months agolib: Pass mem_ctx to cache_path()
Volker Lendecke [Thu, 16 Aug 2018 08:51:44 +0000 (10:51 +0200)]
lib: Pass mem_ctx to cache_path()

Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug 17 14:28:51 CEST 2018 on sn-devel-144

13 months agolib: Pass mem_ctx to state_path()
Volker Lendecke [Thu, 16 Aug 2018 08:51:44 +0000 (10:51 +0200)]
lib: Pass mem_ctx to state_path()

Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
13 months agolib: Pass mem_ctx to lock_path()
Volker Lendecke [Thu, 16 Aug 2018 08:51:44 +0000 (10:51 +0200)]
lib: Pass mem_ctx to lock_path()

Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
13 months agolib: Pass "mem_ctx" down to xx_path
Volker Lendecke [Thu, 16 Aug 2018 08:45:23 +0000 (10:45 +0200)]
lib: Pass "mem_ctx" down to xx_path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
13 months agopygpo: Fix a talloc_tos() leak in py_gpo_get_unix_path
Volker Lendecke [Fri, 17 Aug 2018 08:11:03 +0000 (10:11 +0200)]
pygpo: Fix a talloc_tos() leak in py_gpo_get_unix_path

cache_path() implicitly puts its result on talloc_tos(). As in
py_gpo_get_unix_path the talloc_stackframe() is only created after the
cache_path() call, we leak the result of cache_path() on
talloc_tos() (which might or might not exist).

This converts the function to the pattern used elsewhere: Create the
stackframe as the very first action and remove it as the very last
action in the function.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
13 months agotorture3: Extend the g_lock6 test to also cover upgrades
Volker Lendecke [Tue, 14 Aug 2018 11:54:56 +0000 (13:54 +0200)]
torture3: Extend the g_lock6 test to also cover upgrades

The fixes for #13195 were incomplete and did not cover upgrades
properly. It's all gone in master with the new code.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug 17 10:34:53 CEST 2018 on sn-devel-144

13 months agotorture3: Enhance g_lock6 to run without CLEAR_IF_FIRST
Volker Lendecke [Tue, 14 Aug 2018 11:53:11 +0000 (13:53 +0200)]
torture3: Enhance g_lock6 to run without CLEAR_IF_FIRST

CLEAR_IF_FIRST doesn't really work in the cluster. This needs to be
applied to all tests, but lock6 is what I care about right now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
13 months agotorture3: Simplify the g_lock6 test
Volker Lendecke [Tue, 14 Aug 2018 11:52:11 +0000 (13:52 +0200)]
torture3: Simplify the g_lock6 test

Do string_term_tdb_data just once, this is a leftover from a sweeping
change from "char *" to TDB_DATA as g_lock key.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
13 months agodocs smb.conf: Clarify that wreplsrv:periodic_interval is in seconds
Andrew Bartlett [Thu, 16 Aug 2018 21:56:57 +0000 (09:56 +1200)]
docs smb.conf: Clarify that wreplsrv:periodic_interval is in seconds

As requested by oota on samba-technical

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 17 05:53:54 CEST 2018 on sn-devel-144

13 months agoRefactor for PEP8 warning E501 line too long
Tim Beale [Fri, 27 Jul 2018 03:55:36 +0000 (15:55 +1200)]
Refactor for PEP8 warning E501 line too long

Rename a couple of really long functions.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoRefactor for PEP8 warning E501 line too long
Tim Beale [Fri, 27 Jul 2018 03:27:09 +0000 (15:27 +1200)]
Refactor for PEP8 warning E501 line too long

Add a wrapper function to avoid long lines. This also helps
a little to manage/contain the complexity of the code.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E501 line too long
Tim Beale [Fri, 27 Jul 2018 02:34:16 +0000 (14:34 +1200)]
Fix PEP8 warning E501 line too long

Mostly involves splitting up long strings or comments so that they
span multiple lines. Some place-holder variables have been added in a
few places to avoid exceeding 80 chars.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoRefactor for PEP8 warning E501 line too long
Tim Beale [Fri, 27 Jul 2018 02:36:10 +0000 (14:36 +1200)]
Refactor for PEP8 warning E501 line too long

Rename a parameter that an internal function takes so that the function
call doesn't overrun 80 chars.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoRefactor for PEP8 warning E501 line too long
Tim Beale [Fri, 27 Jul 2018 02:04:10 +0000 (14:04 +1200)]
Refactor for PEP8 warning E501 line too long

The attribute names here are so long it means there's not a very nice
way to wrap the long lines, so add a helper function

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning W503 line break before binary operator
Tim Beale [Fri, 27 Jul 2018 01:49:16 +0000 (13:49 +1200)]
Fix PEP8 warning W503 line break before binary operator

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning W291 trailing whitespace
Tim Beale [Fri, 27 Jul 2018 01:46:55 +0000 (13:46 +1200)]
Fix PEP8 warning W291 trailing whitespace

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E303 too many blank lines
Tim Beale [Fri, 27 Jul 2018 01:43:22 +0000 (13:43 +1200)]
Fix PEP8 warning E303 too many blank lines

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E302 expected 2 blank lines
Tim Beale [Fri, 27 Jul 2018 01:42:18 +0000 (13:42 +1200)]
Fix PEP8 warning E302 expected 2 blank lines

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E231 missing whitespace after ','
Tim Beale [Fri, 27 Jul 2018 01:12:28 +0000 (13:12 +1200)]
Fix PEP8 warning E231 missing whitespace after ','

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning F401 'blah' imported but unused
Tim Beale [Fri, 27 Jul 2018 00:31:43 +0000 (12:31 +1200)]
Fix PEP8 warning F401 'blah' imported but unused

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E225 missing whitespace around operator
Tim Beale [Fri, 27 Jul 2018 01:26:23 +0000 (13:26 +1200)]
Fix PEP8 warning E225 missing whitespace around operator

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning F841 local variable 'blah' is assigned to but never used
Tim Beale [Fri, 27 Jul 2018 00:38:55 +0000 (12:38 +1200)]
Fix PEP8 warning F841 local variable 'blah' is assigned to but never used

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agosamba-tool domain passwordsettings: Avoid except Exception
Andrew Bartlett [Fri, 10 Aug 2018 01:06:36 +0000 (13:06 +1200)]
samba-tool domain passwordsettings: Avoid except Exception

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agopython/pso tests: use string .format() style rather than C-style %s/%d.
Tim Beale [Wed, 15 Aug 2018 05:21:43 +0000 (17:21 +1200)]
python/pso tests: use  string .format() style rather than C-style %s/%d.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E122/E126/E127 wrong indent for continuation lines
Tim Beale [Fri, 27 Jul 2018 00:50:41 +0000 (12:50 +1200)]
Fix PEP8 warning E122/E126/E127 wrong indent for continuation lines

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E201/202/203 array/dict whitespace
Tim Beale [Fri, 27 Jul 2018 01:36:18 +0000 (13:36 +1200)]
Fix PEP8 warning E201/202/203 array/dict whitespace

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoFix PEP8 warning E711 comparison to None
Tim Beale [Fri, 27 Jul 2018 01:33:26 +0000 (13:33 +1200)]
Fix PEP8 warning E711 comparison to None

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agopython3: reuse cmp_fn defined in compat.py
Joe Guo [Mon, 30 Jul 2018 02:13:14 +0000 (14:13 +1200)]
python3: reuse cmp_fn defined in compat.py

This will also fix PEP8 E306:

    expected 1 blank line before a nested definition, found 0

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agopython/samba/tests: fix SamDB dummy replacement
Joe Guo [Mon, 30 Jul 2018 01:56:55 +0000 (13:56 +1200)]
python/samba/tests: fix SamDB dummy replacement

In commit 6de9d878b, a dummy SamDB lambda was added:

    SamDB = lambda *x: None

The `*x` will only cover positional args. If we call it with kwargs:

    samdb = SamDB(url=url)

We will get TypeError:

    <lambda>() got an unexpected keyword argument 'url'

This commit fix this. It also fix PEP8 E731:

    do not assign a lambda expression, use a def

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13542

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agodescriptor: add missing backslash for long sddl str
Joe Guo [Sun, 29 Jul 2018 23:50:18 +0000 (11:50 +1200)]
descriptor: add missing backslash for long sddl str

Find this bug while doing PEP8.
We are lucky this code was not used yet.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agoWHATSNEW: Add information on new GPO features
Andrew Bartlett [Thu, 12 Jul 2018 04:14:27 +0000 (16:14 +1200)]
WHATSNEW: Add information on new GPO features

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 17 02:44:41 CEST 2018 on sn-devel-144

13 months agogpo: Always use an SMB signed connection
Andrew Bartlett [Thu, 16 Aug 2018 01:10:58 +0000 (13:10 +1200)]
gpo: Always use an SMB signed connection

This ensures data integrity in the backup.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
13 months agogpo: Maintain an XML DTD for reference of the backup
Garming Sam [Wed, 13 Jun 2018 04:52:55 +0000 (16:52 +1200)]
gpo: Maintain an XML DTD for reference of the backup

This may or may not actually parse, but is mostly for reference

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agotests/gpo: Tests using a static backup directory from gpo backup
Garming Sam [Tue, 12 Jun 2018 04:19:57 +0000 (16:19 +1200)]
tests/gpo: Tests using a static backup directory from gpo backup

In particular, we want to see that the binary matches, that the XML will
backup to the same values, that the fallback with copy-restore works,
and that the generalize will generalize over different restored
entities.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agotests/gpo: Add a backup for showing that GPO backup and restore works
Garming Sam [Wed, 13 Jun 2018 02:54:08 +0000 (14:54 +1200)]
tests/gpo: Add a backup for showing that GPO backup and restore works

This will be used to write a test in the coming patches.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogpo: Make restore with entities more robust
Garming Sam [Tue, 12 Jun 2018 04:19:41 +0000 (16:19 +1200)]
gpo: Make restore with entities more robust

Sometimes the restore fails for unknown reasons, but rearranging the XML
such that the DTD is after the xml header appears to fix it. This might
be the case in certain files where no entities are used perhaps.

This could probably be made more tolerant using regex, but for the most
part we expect the fixed output from the minidom pretty-printed XML.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogitattributes: Ignore .SAMBABACKUP files
Garming Sam [Wed, 13 Jun 2018 02:38:33 +0000 (14:38 +1200)]
gitattributes: Ignore .SAMBABACKUP files

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogpo: Add a --generalize to the backup command
Garming Sam [Mon, 28 May 2018 23:57:26 +0000 (11:57 +1200)]
gpo: Add a --generalize to the backup command

This normally prints out the entities in DTD form to be given to the restore
command with --entities. Specifying --entities during the backup conveniently
writes these entities to a file. Generalizing occurs after the standard backup
on the XML files, which will then re-write the XML file.

There are a number of files which can be further handled, including many of the
preferences XML files. This will require more annotation and parsing.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agofdeploy_ini: Generalize the share name SIDs
Garming Sam [Tue, 29 May 2018 21:42:45 +0000 (09:42 +1200)]
fdeploy_ini: Generalize the share name SIDs

This overrides the custom entity handler defined in the top level parser.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogp_parse: Add a generalize XML function to the top level parser
Garming Sam [Mon, 28 May 2018 23:57:26 +0000 (11:57 +1200)]
gp_parse: Add a generalize XML function to the top level parser

In this function we take XML and using the required metadata, we rewrite
it into a generic form using entities. ElementTree unfortunately does
not allow us to store unescaped entities, and so we must do a textual
replace on the output XML.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogp_ini: Add a scripts ini parser for better generalization
Garming Sam [Wed, 6 Jun 2018 00:57:12 +0000 (12:57 +1200)]
gp_ini: Add a scripts ini parser for better generalization

We mark the command path argument as a network path.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
13 months agogp_ini: Add a fdeploy1 parser for better generalization
Garming Sam [Thu, 24 May 2018 03:17:35 +0000 (15:17 +1200)]
gp_ini: Add a fdeploy1 parser for better generalization

We still fail to handle entities in fdeploy.ini (version 0) files. Here we
manage to factor out some of the SIDs, but not all of them. This will be
completed in a later patch. The overall idea is to split the SID values into
individual XML elements and annotate them. We also note down network paths for
the redirection folders.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>