metze/samba/wip.git
5 years agoOutput examples master3-durable
Stefan Metzmacher [Fri, 17 Aug 2018 13:19:25 +0000 (15:19 +0200)]
Output examples

bin/smbtorture //172.31.9.192/torture -Uadministrator%geheim 'base.delaywrite-legacy' 2>&1 | tee out.legacy-192
bin/smbtorture //172.31.9.219/torture -Uadministrator%A1b2C3d4 'base.delaywrite-modern' 2>&1 | tee out.modern-219
bin/smbtorture //172.31.9.187/torture -Uadministrator%A1b2C3d4 'base.delaywrite-modern' 2>&1 | tee out.modern-187

172.31.9.192 is Windows 2000 SP4
172.31.9.219 is Windows 2008 R2
172.31.9.187 is Windows 2016

5 years agomodern and legacy delaywrite => 0.5 sec delay
Stefan Metzmacher [Fri, 17 Aug 2018 10:25:17 +0000 (12:25 +0200)]
modern and legacy delaywrite => 0.5 sec delay

5 years agoTODO: smb2_server: set req->do_encryption = true earlier
Stefan Metzmacher [Fri, 17 Aug 2018 09:35:41 +0000 (11:35 +0200)]
TODO: smb2_server: set req->do_encryption = true earlier

TODO: tests

https://blogs.msdn.microsoft.com/openspecification/2012/10/05/encryption-in-smb-3-0-a-protocol-perspective/

The sender encrypts the message if any of the following conditions is
satisfied:

    If the sender is sending a response to an encrypted request.
    If Session.EncryptData is TRUE and the request or response being
sent is not NEGOTIATE.
    If Session.EncryptData is FALSE, the request or response being sent
is not NEGOTIATE or SESSION_SETUP or TREE_CONNECT, and
<TreeConnect|Share>.EncryptData is TRUE.

[MS-SMB2] 3.3.4.1.4 Encrypting the Message

 If Connection.Dialect belongs to the SMB 3.x dialect family and
 Connection.ClientCapabilities includes the SMB2_GLOBAL_CAP_ENCRYPTION
 bit, the server MUST encrypt the message before sending, if any of the
 following conditions are satisfied:

 - If the message being sent is any response to a client request for which
   Request.IsEncrypted is TRUE.

 - If Session.EncryptData is TRUE and the response being sent is not
   SMB2_NEGOTIATE or SMB2 SESSION_SETUP.

 - If Session.EncryptData is FALSE, the response being sent is not
   SMB2_NEGOTIATE or SMB2 SESSION_SETUP or SMB2 TREE_CONNECT, and
   Share.EncryptData for the share associated with the TreeId in the SMB2
   header of the response is TRUE.

 The server MUST encrypt the message as specified in section 3.1.4.3,
 before sending it to the client.

5 years agosq modern and legacy delaywrite selftest
Stefan Metzmacher [Fri, 17 Aug 2018 00:57:40 +0000 (02:57 +0200)]
sq modern and legacy delaywrite selftest

5 years agosq test_delaywrite_delaywrite1
Stefan Metzmacher [Fri, 17 Aug 2018 00:48:30 +0000 (02:48 +0200)]
sq test_delaywrite_delaywrite1

5 years agomodern and legacy delaywrite
Stefan Metzmacher [Fri, 17 Aug 2018 00:24:52 +0000 (02:24 +0200)]
modern and legacy delaywrite

5 years agomodern and legacy delaywrite => legacy works against w2k
Stefan Metzmacher [Fri, 17 Aug 2018 00:24:52 +0000 (02:24 +0200)]
modern and legacy delaywrite => legacy works against w2k

legacy lower time to 1 sec?

5 years agoRevert "test_delayed_write_update4 HACKS ..."
Stefan Metzmacher [Thu, 16 Aug 2018 23:51:46 +0000 (01:51 +0200)]
Revert "test_delayed_write_update4 HACKS ..."

This reverts commit 092f769e1c75012a51949694da06e3c31f33198e.

5 years agotest_delayed_write_update4 HACKS ...
Stefan Metzmacher [Thu, 16 Aug 2018 23:51:28 +0000 (01:51 +0200)]
test_delayed_write_update4 HACKS ...

5 years agoRevert "HACK w2k behaviour"
Stefan Metzmacher [Thu, 16 Aug 2018 23:50:54 +0000 (01:50 +0200)]
Revert "HACK w2k behaviour"

This reverts commit 8d751a927ea95c7b9d1ae013237cdb1a049b7d1a.

5 years agoHACK w2k behaviour
Stefan Metzmacher [Thu, 16 Aug 2018 23:50:41 +0000 (01:50 +0200)]
HACK w2k behaviour

5 years agoMSG_SMB_FILE_PATHINFO
Stefan Metzmacher [Thu, 16 Aug 2018 23:50:08 +0000 (01:50 +0200)]
MSG_SMB_FILE_PATHINFO

5 years agosq smb2.timestamps
Stefan Metzmacher [Thu, 16 Aug 2018 08:18:25 +0000 (10:18 +0200)]
sq smb2.timestamps

5 years agos4:libcli: cleanup smbcli_deltree()
Stefan Metzmacher [Thu, 16 Aug 2018 08:16:46 +0000 (10:16 +0200)]
s4:libcli: cleanup smbcli_deltree()

We already have the 'status' of smbcli_unlink(), so
we can check that directly.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agoTODO smbd: allow durable opens together with stat opens
Stefan Metzmacher [Thu, 16 Aug 2018 08:14:20 +0000 (10:14 +0200)]
TODO smbd: allow durable opens together with stat opens

TODO: explicit tests

5 years agofix mark_file_modified for new Windows >= 2008R2 behaviour
Stefan Metzmacher [Wed, 15 Aug 2018 19:22:03 +0000 (21:22 +0200)]
fix mark_file_modified for new Windows >= 2008R2 behaviour

5 years agotest_timestamp_delaywrite1a/b durable-reconnect
Stefan Metzmacher [Wed, 15 Aug 2018 19:15:16 +0000 (21:15 +0200)]
test_timestamp_delaywrite1a/b durable-reconnect

5 years agosq source4/torture/smb2/timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 19:11:39 +0000 (21:11 +0200)]
sq source4/torture/smb2/timestamps.c

5 years agosq test_smb_timestamp_writetime1 source4/torture/util_smb_timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 18:22:07 +0000 (20:22 +0200)]
sq test_smb_timestamp_writetime1 source4/torture/util_smb_timestamps.c

5 years agosq source4/torture/smb2/timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 18:11:42 +0000 (20:11 +0200)]
sq source4/torture/smb2/timestamps.c

5 years agorevert test_delayed_write_update3
Stefan Metzmacher [Wed, 15 Aug 2018 18:09:31 +0000 (20:09 +0200)]
revert test_delayed_write_update3

5 years agoRevert "break test_delayed_write_update with a PATHINFO call..."
Stefan Metzmacher [Wed, 15 Aug 2018 18:08:25 +0000 (20:08 +0200)]
Revert "break test_delayed_write_update with a PATHINFO call..."

This reverts commit 713123bda5075672afcb211a6742950ad968b146.

5 years agosq test_durable_open_delaywrite1 source4/torture/smb2/timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 18:07:43 +0000 (20:07 +0200)]
sq test_durable_open_delaywrite1 source4/torture/smb2/timestamps.c

5 years agosq test_delaywrite_delaywrite1 source4/torture/basic/delaywrite.c
Stefan Metzmacher [Wed, 15 Aug 2018 18:07:18 +0000 (20:07 +0200)]
sq test_delaywrite_delaywrite1 source4/torture/basic/delaywrite.c

5 years agorevert source4/torture/smb2/durable_open.c
Stefan Metzmacher [Wed, 15 Aug 2018 18:04:02 +0000 (20:04 +0200)]
revert source4/torture/smb2/durable_open.c

5 years agotest_smb_timestamp_writetime1 source4/torture/util_smb_timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 17:57:53 +0000 (19:57 +0200)]
test_smb_timestamp_writetime1 source4/torture/util_smb_timestamps.c

5 years agoRevert "test_delayed_write_update TODO: research PATHINFO => DEFER_CHANGE_ON_CLOSE"
Stefan Metzmacher [Wed, 15 Aug 2018 17:54:03 +0000 (19:54 +0200)]
Revert "test_delayed_write_update TODO: research PATHINFO => DEFER_CHANGE_ON_CLOSE"

This reverts commit c666c2a9f1cd123ef4ba2c4d60ff63eb1bfaec2f.

5 years agotest_delayed_write_update TODO: research PATHINFO => DEFER_CHANGE_ON_CLOSE
Stefan Metzmacher [Wed, 15 Aug 2018 17:53:17 +0000 (19:53 +0200)]
test_delayed_write_update TODO: research PATHINFO => DEFER_CHANGE_ON_CLOSE

5 years agosq source4/torture/basic/delaywrite.c
Stefan Metzmacher [Wed, 15 Aug 2018 17:53:06 +0000 (19:53 +0200)]
sq source4/torture/basic/delaywrite.c

5 years agosq source4/torture/smb2/timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 17:52:30 +0000 (19:52 +0200)]
sq source4/torture/smb2/timestamps.c

5 years agosource4/torture/util_writetime.c test_delay_writetime1
Stefan Metzmacher [Wed, 15 Aug 2018 17:51:48 +0000 (19:51 +0200)]
source4/torture/util_writetime.c test_delay_writetime1

5 years agosource4/torture/smb2/timestamps.c
Stefan Metzmacher [Wed, 15 Aug 2018 17:29:33 +0000 (19:29 +0200)]
source4/torture/smb2/timestamps.c

5 years agoworks for SMB1 and SMB2
Stefan Metzmacher [Wed, 15 Aug 2018 08:54:27 +0000 (10:54 +0200)]
works for SMB1 and SMB2

5 years agobreak test_delayed_write_update with a PATHINFO call...
Stefan Metzmacher [Wed, 15 Aug 2018 08:43:20 +0000 (10:43 +0200)]
break test_delayed_write_update with a PATHINFO call...

5 years agostill works SMB1
Stefan Metzmacher [Wed, 15 Aug 2018 08:29:06 +0000 (10:29 +0200)]
still works SMB1

5 years agoworks SMB1
Stefan Metzmacher [Wed, 15 Aug 2018 08:23:14 +0000 (10:23 +0200)]
works SMB1

5 years agoworks for SMB2, fails SMB1
Stefan Metzmacher [Wed, 15 Aug 2018 07:58:38 +0000 (09:58 +0200)]
works for SMB2, fails SMB1

SMB1:
no update at all.
What's the difference to 'delayed update of write time' test???

5 years agosq source4/torture/util_writetime.c source4/torture/smb2/durable_open.c
Stefan Metzmacher [Wed, 15 Aug 2018 07:39:36 +0000 (09:39 +0200)]
sq source4/torture/util_writetime.c source4/torture/smb2/durable_open.c

5 years agotest_delaywrite_delaywrite1 SMB1
Stefan Metzmacher [Wed, 15 Aug 2018 06:40:54 +0000 (08:40 +0200)]
test_delaywrite_delaywrite1 SMB1

5 years agosource4/torture/util_writetime.c
Stefan Metzmacher [Wed, 15 Aug 2018 06:06:55 +0000 (08:06 +0200)]
source4/torture/util_writetime.c

5 years agorevert source4/torture/smb2/durable_v2_open.c
Stefan Metzmacher [Tue, 14 Aug 2018 19:51:08 +0000 (21:51 +0200)]
revert source4/torture/smb2/durable_v2_open.c

5 years agosmbd: SMB2 write time mode...???
Stefan Metzmacher [Tue, 14 Aug 2018 19:45:50 +0000 (21:45 +0200)]
smbd: SMB2 write time mode...???

5 years agoTODO source4/torture/smb2/durable_open.c
Stefan Metzmacher [Tue, 14 Aug 2018 13:16:21 +0000 (15:16 +0200)]
TODO source4/torture/smb2/durable_open.c

5 years agoTODO source4/torture/smb2/durable_open.c
Stefan Metzmacher [Tue, 14 Aug 2018 13:16:21 +0000 (15:16 +0200)]
TODO source4/torture/smb2/durable_open.c

5 years agoTODO source4/torture/smb2/durable_open.c
Stefan Metzmacher [Tue, 14 Aug 2018 13:16:21 +0000 (15:16 +0200)]
TODO source4/torture/smb2/durable_open.c

5 years agoTODO source4/torture/smb2/durable_open.c
Stefan Metzmacher [Tue, 14 Aug 2018 13:16:21 +0000 (15:16 +0200)]
TODO source4/torture/smb2/durable_open.c

5 years agoHACK source4/torture/basic/delaywrite.c
Stefan Metzmacher [Tue, 14 Aug 2018 13:15:43 +0000 (15:15 +0200)]
HACK source4/torture/basic/delaywrite.c

5 years agoTODO: bin/smbtorture //172.31.9.187/torture -Uadministrator%A1b2C3d4 smb2.durable...
Stefan Metzmacher [Mon, 13 Aug 2018 16:24:17 +0000 (18:24 +0200)]
TODO: bin/smbtorture //172.31.9.187/torture -Uadministrator%A1b2C3d4 smb2.durable-v2-open.delaywrite1

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

5 years agoRevert "s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with...
Stefan Metzmacher [Mon, 13 Aug 2018 15:30:15 +0000 (17:30 +0200)]
Revert "s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF"

This reverts commit cefc0f33582cf35d38abfcfe3e40bc74e8f7dada.

5 years agoRevert "s3:smb2_lock: pass in_lock_sequence to smbd_smb2_lock_send()"
Stefan Metzmacher [Mon, 13 Aug 2018 15:29:38 +0000 (17:29 +0200)]
Revert "s3:smb2_lock: pass in_lock_sequence to smbd_smb2_lock_send()"

This reverts commit 15a96df54a351516f6e00d5ae46e961452c5b69a.

5 years agoRevert "TODO test pidl/ServerNDR: ignore functions marked as "todo""
Stefan Metzmacher [Mon, 12 Nov 2012 09:23:17 +0000 (10:23 +0100)]
Revert "TODO test pidl/ServerNDR: ignore functions marked as "todo""

This reverts commit 76e32fa6f74d12b64ac731b558b9bdae67dcb019.

5 years agoRevert "dir ~NTCREATEX_SHARE_ACCESS_DELETE"
Stefan Metzmacher [Thu, 1 Nov 2012 15:20:45 +0000 (16:20 +0100)]
Revert "dir ~NTCREATEX_SHARE_ACCESS_DELETE"

This reverts commit bed7b5171fad319e3b58f70d1a510dce68c1bdd8.

5 years agoTODO test pidl/ServerNDR: ignore functions marked as "todo"
Stefan Metzmacher [Sun, 4 Nov 2012 16:22:31 +0000 (17:22 +0100)]
TODO test pidl/ServerNDR: ignore functions marked as "todo"

5 years agoTODO smb2_tcon: add some share flags/capabilities options (Default:off)
Stefan Metzmacher [Tue, 31 Jul 2012 06:55:20 +0000 (08:55 +0200)]
TODO smb2_tcon: add some share flags/capabilities options (Default:off)

5 years agos3:smb2_lock: pass in_lock_sequence to smbd_smb2_lock_send()
Stefan Metzmacher [Wed, 24 Oct 2012 12:53:05 +0000 (14:53 +0200)]
s3:smb2_lock: pass in_lock_sequence to smbd_smb2_lock_send()

Take the value from the client if the dialect is SMB2_10 or higher,
otherwise default to 0.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF
Stefan Metzmacher [Wed, 24 Oct 2012 13:17:56 +0000 (15:17 +0200)]
s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF

This does not match the current documentation, but is very likely the
right thing to do.

If we would match the documentation and initialize with 0x00,
we would return STATUS_SUCCESS without doing any locks.
If the client also follows the documentation and starts
with a lock_sequence of 0 for the first operation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoRevert "oplock..."
Stefan Metzmacher [Sun, 4 Nov 2012 15:58:16 +0000 (16:58 +0100)]
Revert "oplock..."

This reverts commit 143a2d1b6ee978c1fdf21a30804e7fedef0c1bd5.

5 years agooplock...
Stefan Metzmacher [Thu, 4 Oct 2012 21:17:48 +0000 (23:17 +0200)]
oplock...

5 years agosmbd-adm
Stefan Metzmacher [Tue, 20 Sep 2011 22:04:00 +0000 (00:04 +0200)]
smbd-adm

5 years agosmbd-adm
Stefan Metzmacher [Tue, 20 Sep 2011 21:03:19 +0000 (23:03 +0200)]
smbd-adm

5 years agoHACK: add smbd-adm.txt
Stefan Metzmacher [Tue, 5 Jul 2011 14:25:39 +0000 (16:25 +0200)]
HACK: add smbd-adm.txt

5 years agoRevert "TODO: all ncs..."
Stefan Metzmacher [Mon, 17 Sep 2012 16:04:23 +0000 (18:04 +0200)]
Revert "TODO: all ncs..."

This reverts commit 2c2a8c860f91e8fa5cccb9eb561f17aa3e9f9ea1.

5 years agoTODO: all ncs...
Stefan Metzmacher [Mon, 10 Sep 2012 12:24:39 +0000 (14:24 +0200)]
TODO: all ncs...

5 years agoRevert "s4 fix it?"
Stefan Metzmacher [Thu, 9 Aug 2012 11:17:07 +0000 (13:17 +0200)]
Revert "s4 fix it?"

This reverts commit ecbc6e081d37b4936f750b9b958f13c9b5ae3325.

5 years agoRevert "HACK pass s4 create_action..."
Michael Adam [Thu, 9 Aug 2012 10:21:36 +0000 (12:21 +0200)]
Revert "HACK pass s4 create_action..."

This reverts commit 8b4880e53acedc2d3b6734c43154ed5be216e1f2.

5 years agoHACK pass s4 create_action...
Michael Adam [Thu, 9 Aug 2012 10:18:14 +0000 (12:18 +0200)]
HACK pass s4 create_action...

5 years agos4 fix it?
Michael Adam [Wed, 8 Aug 2012 15:32:01 +0000 (17:32 +0200)]
s4 fix it?

5 years agoRevert "09b - TODO: allow durable with delete_on_close in vfswrap_default_durable_dis...
Stefan Metzmacher [Fri, 7 Sep 2012 13:29:03 +0000 (15:29 +0200)]
Revert "09b - TODO: allow durable with delete_on_close in vfswrap_default_durable_disconnect"

This reverts commit a13f5015e750eb59336018d854c42306dab85cd6.

5 years agoRevert "TODO smbXsrv_open_global idl: add persistent"
Stefan Metzmacher [Fri, 7 Sep 2012 13:28:38 +0000 (15:28 +0200)]
Revert "TODO smbXsrv_open_global idl: add persistent"

This reverts commit 85bf07a0444108c8d0f83ca53a3798b12f0109da.

5 years agoRevert "TODO smb2_tcon: add some share flags/capabilities options (Default:off)"
Stefan Metzmacher [Fri, 7 Sep 2012 13:28:19 +0000 (15:28 +0200)]
Revert "TODO smb2_tcon: add some share flags/capabilities options (Default:off)"

This reverts commit 9fb1b5025fe779f8664a44cb6490d1db6e2cdbcf.

5 years agoRevert "BROKEN: TODO smbXsrv_open infra: add "file_name/path_name/share_name = <TODO...
Stefan Metzmacher [Mon, 13 Aug 2018 14:25:27 +0000 (16:25 +0200)]
Revert "BROKEN: TODO smbXsrv_open infra: add "file_name/path_name/share_name = <TODO>" and DEBUG"

This reverts commit b0e1f4b2cb160211fffc1800f8309b40d8d9dcb2.

5 years agoRevert "HACK debug replay/channel_sequence"
Stefan Metzmacher [Sat, 22 Sep 2012 19:52:13 +0000 (21:52 +0200)]
Revert "HACK debug replay/channel_sequence"

This reverts commit 46ce191a9bf9321251ea601a9b3ba7b48c5d5ccb.

5 years agoRevert "HACK disconnect after 2 writes"
Stefan Metzmacher [Thu, 26 Jul 2012 06:23:33 +0000 (08:23 +0200)]
Revert "HACK disconnect after 2 writes"

This reverts commit eaa7023f865be73483a99ff203d1dbfb3e180ef9.

5 years agoHACK disconnect after 2 writes
Stefan Metzmacher [Thu, 26 Jul 2012 06:23:10 +0000 (08:23 +0200)]
HACK disconnect after 2 writes

5 years agoHACK debug replay/channel_sequence
Stefan Metzmacher [Thu, 26 Jul 2012 06:22:01 +0000 (08:22 +0200)]
HACK debug replay/channel_sequence

5 years agoBROKEN: TODO smbXsrv_open infra: add "file_name/path_name/share_name = <TODO>" and...
Stefan Metzmacher [Thu, 28 Jun 2012 14:06:23 +0000 (16:06 +0200)]
BROKEN: TODO smbXsrv_open infra: add "file_name/path_name/share_name = <TODO>" and DEBUG

was 55159a5499d4341d601b38d1e03bff7280053343

5 years agoTODO smb2_tcon: add some share flags/capabilities options (Default:off)
Stefan Metzmacher [Tue, 31 Jul 2012 06:55:20 +0000 (08:55 +0200)]
TODO smb2_tcon: add some share flags/capabilities options (Default:off)

5 years agoTODO smbXsrv_open_global idl: add persistent
Stefan Metzmacher [Sat, 30 Jun 2012 10:31:28 +0000 (12:31 +0200)]
TODO smbXsrv_open_global idl: add persistent

MAYBE squash with "smbXsrv_open_global idl: add more SMB 2.10/3.00 stuff TODO: more"

5 years ago09b - TODO: allow durable with delete_on_close in vfswrap_default_durable_disconnect
Michael Adam [Tue, 7 Aug 2012 13:59:12 +0000 (15:59 +0200)]
09b - TODO: allow durable with delete_on_close in vfswrap_default_durable_disconnect

5 years agoRevert "TODO later? smbXsrv_open_close_all"
Stefan Metzmacher [Mon, 18 Jun 2012 11:32:29 +0000 (13:32 +0200)]
Revert "TODO later? smbXsrv_open_close_all"

This reverts commit be146b939400dda6d2ec5b77d9f6224ce6363927.

5 years agoTODO later? smbXsrv_open_close_all
Stefan Metzmacher [Mon, 18 Jun 2012 11:27:19 +0000 (13:27 +0200)]
TODO later? smbXsrv_open_close_all

5 years agoTODO: add server-id-disconnected.txt
Michael Adam [Mon, 6 Aug 2012 14:17:07 +0000 (16:17 +0200)]
TODO: add server-id-disconnected.txt

5 years agoTODO.durable
Michael Adam [Fri, 29 Jun 2012 14:17:19 +0000 (16:17 +0200)]
TODO.durable

5 years agoadd questions.txt
Michael Adam [Thu, 7 Jun 2012 14:32:10 +0000 (16:32 +0200)]
add questions.txt

5 years agodurable.txt
Stefan Metzmacher [Thu, 31 May 2012 07:45:16 +0000 (09:45 +0200)]
durable.txt

5 years agoconnection_struct.txt
Stefan Metzmacher [Fri, 25 May 2012 09:48:27 +0000 (11:48 +0200)]
connection_struct.txt

5 years agocmd.txt
Stefan Metzmacher [Sat, 16 Jun 2012 10:28:46 +0000 (12:28 +0200)]
cmd.txt

5 years agodo_out.sh
Stefan Metzmacher [Wed, 6 Jun 2012 10:02:38 +0000 (12:02 +0200)]
do_out.sh

5 years agoRevert "TODO make sure the gid doesn't belong to a user s3:passdb: return ID_TYPE_BOT...
Stefan Metzmacher [Mon, 3 Dec 2012 07:28:26 +0000 (08:28 +0100)]
Revert "TODO make sure the gid doesn't belong to a user s3:passdb: return ID_TYPE_BOTH for builtin and wellknown sids from pdb_default_sid_to_id()"

This reverts commit affad381e7baff28550f5097711235e3ca041596.

5 years agoRevert "TODO(richtig so? - oder auch user?) s3:passdb: set ID_TYPE_BOTH for groups...
Stefan Metzmacher [Mon, 3 Dec 2012 07:28:20 +0000 (08:28 +0100)]
Revert "TODO(richtig so? - oder auch user?) s3:passdb: set ID_TYPE_BOTH for groups from own sam in pdb_defaul_sid_to_id()"

This reverts commit e2becf56263e1d6b168be6a38ea436425e4a48e8.

5 years agoTODO(richtig so? - oder auch user?) s3:passdb: set ID_TYPE_BOTH for groups from own...
Michael Adam [Mon, 3 Dec 2012 00:50:24 +0000 (01:50 +0100)]
TODO(richtig so? - oder auch user?) s3:passdb: set ID_TYPE_BOTH for groups from own sam in pdb_defaul_sid_to_id()

This way, one can set groups as file owners.

Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoTODO make sure the gid doesn't belong to a user s3:passdb: return ID_TYPE_BOTH for...
Michael Adam [Mon, 3 Dec 2012 00:48:15 +0000 (01:48 +0100)]
TODO make sure the gid doesn't belong to a user s3:passdb: return ID_TYPE_BOTH for builtin and wellknown sids from pdb_default_sid_to_id()

This allows e.g. for BUILTIN\\administrators to be taken as file owner (user).

Signed-off-by: Michael Adam <obnox@samba.org>
5 years agos3:registry: Fix possible memory leak in _reg_perfcount_multi_sz_from_tdb()
Andreas Schneider [Thu, 9 Aug 2018 14:15:10 +0000 (16:15 +0200)]
s3:registry: Fix possible memory leak in _reg_perfcount_multi_sz_from_tdb()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 11 04:43:15 CEST 2018 on sn-devel-144

5 years agos3:libads: Fix memory leaks in ads_krb5_chg_password()
Andreas Schneider [Thu, 9 Aug 2018 14:02:16 +0000 (16:02 +0200)]
s3:libads: Fix memory leaks in ads_krb5_chg_password()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:client: Avoid a possible fd leak in do_get()
Andreas Schneider [Thu, 9 Aug 2018 13:58:32 +0000 (15:58 +0200)]
s3:client: Avoid a possible fd leak in do_get()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:lib: Fix a possible fd leak in gp_get_file()
Andreas Schneider [Thu, 9 Aug 2018 14:42:43 +0000 (16:42 +0200)]
s4:lib: Fix a possible fd leak in gp_get_file()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:utils: Do not leak memory in new_user()
Andreas Schneider [Thu, 9 Aug 2018 14:30:03 +0000 (16:30 +0200)]
s3:utils: Do not leak memory in new_user()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:utils: Do not overflow the destination buffer in net_idmap_restore()
Andreas Schneider [Thu, 9 Aug 2018 14:19:48 +0000 (16:19 +0200)]
s3:utils: Do not overflow the destination buffer in net_idmap_restore()

Found by covsan.

error[invalidScanfFormatWidth]: Width 128 given in format string (no. 2)
is larger than destination buffer 'sid_string[128]', use %127s to
prevent overflowing it.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:passdb: Don't leak memory on error in fetch_ldap_pw()
Andreas Schneider [Thu, 9 Aug 2018 14:05:41 +0000 (16:05 +0200)]
s3:passdb: Don't leak memory on error in fetch_ldap_pw()

Found by covscan.

A candidate to use tallac ...

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowbinfo: Free memory when we leave wbinfo_dsgetdcname()
Andreas Schneider [Thu, 9 Aug 2018 13:53:45 +0000 (15:53 +0200)]
wbinfo: Free memory when we leave wbinfo_dsgetdcname()

Found by covscan.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>