ira/wip.git
14 years agos3: Make login_cache_write take a pointer
Volker Lendecke [Tue, 16 Mar 2010 21:22:21 +0000 (22:22 +0100)]
s3: Make login_cache_write take a pointer

14 years agos3: Make login_cache_read take a pointer, avoid a malloc
Volker Lendecke [Tue, 16 Mar 2010 21:18:52 +0000 (22:18 +0100)]
s3: Make login_cache_read take a pointer, avoid a malloc

14 years agos3: Remove a typedef
Volker Lendecke [Tue, 16 Mar 2010 21:08:37 +0000 (22:08 +0100)]
s3: Remove a typedef

14 years agos3: Fix some nonempty blank lines
Volker Lendecke [Tue, 16 Mar 2010 21:23:06 +0000 (22:23 +0100)]
s3: Fix some nonempty blank lines

14 years agos3: fix buildwarning in smbta-util.
Günther Deschner [Tue, 16 Mar 2010 21:17:55 +0000 (22:17 +0100)]
s3: fix buildwarning in smbta-util.

Guenther

14 years agos4-smbtorture: add lsa_SetTrustedDomainInfoByName NDR test.
Günther Deschner [Tue, 16 Mar 2010 20:50:07 +0000 (21:50 +0100)]
s4-smbtorture: add lsa_SetTrustedDomainInfoByName NDR test.

Thanks Simo for providing the data and pointing out the IDL failure.

Guenther

14 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 16 Mar 2010 20:15:50 +0000 (21:15 +0100)]
s3: re-run make samba3-idl.

Guenther

14 years agolsa: fix IDL for lsa_SetTrustedDomainInfoByName.
Günther Deschner [Tue, 16 Mar 2010 20:14:45 +0000 (21:14 +0100)]
lsa: fix IDL for lsa_SetTrustedDomainInfoByName.

Guenther

14 years agoFix developer build, remove malloc
Andreas Schneider [Tue, 16 Mar 2010 17:27:00 +0000 (13:27 -0400)]
Fix developer build, remove malloc

14 years agokerberos - set the memory to "0"s before freeing the password to prevent security...
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 17:20:51 +0000 (18:20 +0100)]
kerberos - set the memory to "0"s before freeing the password to prevent security issues

14 years agoheimdal - remove unused variable
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 16:07:04 +0000 (17:07 +0100)]
heimdal - remove unused variable

14 years agoheimdal - fix overlapped identifiers in the "krb5" library
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 15:53:39 +0000 (16:53 +0100)]
heimdal - fix overlapped identifiers in the "krb5" library

14 years agoheimdal - free always "ctx->password" when it isn't needed anymore
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 15:26:25 +0000 (16:26 +0100)]
heimdal - free always "ctx->password" when it isn't needed anymore

"strdup" does always create a new object in the memory (through "malloc") which
needs to be freed if it isn't used anymore.

14 years agos4:auth/kerberos/kerberos.c - fix also here a memory leak
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 15:29:46 +0000 (16:29 +0100)]
s4:auth/kerberos/kerberos.c - fix also here a memory leak

The options need to be freed also on this error case.

14 years agolibcli/auth/schannel_state_tdb.c - fix a memory leak
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 15:23:57 +0000 (16:23 +0100)]
libcli/auth/schannel_state_tdb.c - fix a memory leak

14 years agos4:wb_cmd_getgroups - fix failure in s4 winbind's "getgroups"
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 15:00:34 +0000 (16:00 +0100)]
s4:wb_cmd_getgroups - fix failure in s4 winbind's "getgroups"

14 years agos4-smbtorture: use random buffer for extended SetValue test in RPC-WINREG.
Günther Deschner [Tue, 16 Mar 2010 15:05:07 +0000 (16:05 +0100)]
s4-smbtorture: use random buffer for extended SetValue test in RPC-WINREG.

Guenther

14 years agos4:torture/rpc/winreg.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 16:56:14 +0000 (17:56 +0100)]
s4:torture/rpc/winreg.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/spoolss_win.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Fri, 12 Mar 2010 10:09:00 +0000 (11:09 +0100)]
s4:torture/rpc/spoolss_win.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/spoolss_notify.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Fri, 12 Mar 2010 09:53:54 +0000 (10:53 +0100)]
s4:torture/rpc/spoolss_notify.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/spoolss_notify.c: fix compiler warnings
Stefan Metzmacher [Fri, 12 Mar 2010 09:53:15 +0000 (10:53 +0100)]
s4:torture/rpc/spoolss_notify.c: fix compiler warnings

metze

14 years agos4:torture/rpc/spoolss.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 10:45:51 +0000 (11:45 +0100)]
s4:torture/rpc/spoolss.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:tortore/rpc/spoolss.c: fix compiler warning
Stefan Metzmacher [Tue, 16 Mar 2010 09:27:42 +0000 (10:27 +0100)]
s4:tortore/rpc/spoolss.c: fix compiler warning

metze

14 years agos4:torture/rpc/autoidl.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 09:55:12 +0000 (10:55 +0100)]
s4:torture/rpc/autoidl.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/mgmt.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 09:43:39 +0000 (10:43 +0100)]
s4:torture/rpc/mgmt.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/remact.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 09:42:58 +0000 (10:42 +0100)]
s4:torture/rpc/remact.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/oxidresolve.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 09:36:19 +0000 (10:36 +0100)]
s4:torture/rpc/oxidresolve.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/initshutdown.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Tue, 16 Mar 2010 09:32:56 +0000 (10:32 +0100)]
s4:torture/rpc/initshutdown.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/epmapper.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:59:05 +0000 (10:59 +0100)]
s4:torture/rpc/epmapper.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/eventlog.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:55:00 +0000 (10:55 +0100)]
s4:torture/rpc/eventlog.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:tortore/rpc/eventlog.c: rename variable 'b' => 'br'
Stefan Metzmacher [Mon, 15 Mar 2010 09:53:50 +0000 (10:53 +0100)]
s4:tortore/rpc/eventlog.c: rename variable 'b' => 'br'

metze

14 years agos4:torture/rpc/svcctl.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:50:12 +0000 (10:50 +0100)]
s4:torture/rpc/svcctl.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/atsvc.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:49:02 +0000 (10:49 +0100)]
s4:torture/rpc/atsvc.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/wkssvc.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:19:02 +0000 (10:19 +0100)]
s4:torture/rpc/wkssvc.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/srvsvc.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Mon, 15 Mar 2010 09:08:04 +0000 (10:08 +0100)]
s4:torture/rpc/srvsvc.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/dsgetinfo.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Thu, 11 Mar 2010 12:03:26 +0000 (13:03 +0100)]
s4:torture/rpc/dsgetinfo.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/dssync.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Thu, 11 Mar 2010 11:55:46 +0000 (12:55 +0100)]
s4:torture/rpc/dssync.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/drsuapi*: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Thu, 11 Mar 2010 11:55:24 +0000 (12:55 +0100)]
s4:torture/rpc/drsuapi*: make use of dcerpc_binding_handle stubs

metze

14 years agos4:torture/rpc/unixinfo.c: make use of dcerpc_binding_handle stubs
Stefan Metzmacher [Fri, 12 Mar 2010 10:25:01 +0000 (11:25 +0100)]
s4:torture/rpc/unixinfo.c: make use of dcerpc_binding_handle stubs

metze

14 years agos4-smbtorture: remove NotifyChangeKeyValue s3 skip in RPC-WINREG:
Günther Deschner [Tue, 16 Mar 2010 14:30:13 +0000 (15:30 +0100)]
s4-smbtorture: remove NotifyChangeKeyValue s3 skip in RPC-WINREG:

Guenther

14 years agos3-winreg: change notify call has no meaning when called remotely.
Günther Deschner [Tue, 16 Mar 2010 14:29:14 +0000 (15:29 +0100)]
s3-winreg: change notify call has no meaning when called remotely.

Just return not supported to make smbtorture happy.

Guenther

14 years agos3-registry: make sure root has full registry access (in particular for make test).
Günther Deschner [Tue, 16 Mar 2010 12:53:54 +0000 (13:53 +0100)]
s3-registry: make sure root has full registry access (in particular for make test).

Guenther

14 years agos4-smbtorture: make it a bit easier to track failures in RPC-SPOOLSS-PRINTER.
Günther Deschner [Tue, 16 Mar 2010 12:52:48 +0000 (13:52 +0100)]
s4-smbtorture: make it a bit easier to track failures in RPC-SPOOLSS-PRINTER.

Guenther

14 years agos4:torture-ndr add lsarSetForestTrustInformation ndr test
Simo Sorce [Fri, 26 Feb 2010 02:40:27 +0000 (21:40 -0500)]
s4:torture-ndr add lsarSetForestTrustInformation ndr test

Signed-off-by: Günther Deschner <gd@samba.org>
14 years agos4-lsa: fix dcesrv_lsa_lsaRSetForestTrustInformation server stub.
Günther Deschner [Tue, 16 Mar 2010 13:03:49 +0000 (14:03 +0100)]
s4-lsa: fix dcesrv_lsa_lsaRSetForestTrustInformation server stub.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
14 years agos3-lsa: fix _lsa_lsaRSetForestTrustInformation server stub.
Günther Deschner [Tue, 16 Mar 2010 13:03:35 +0000 (14:03 +0100)]
s3-lsa: fix _lsa_lsaRSetForestTrustInformation server stub.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
14 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 16 Mar 2010 13:01:27 +0000 (14:01 +0100)]
s3: re-run make samba3-idl.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
14 years agos4:idl add lsaRSetForestTrustInformation
Simo Sorce [Tue, 16 Mar 2010 12:59:32 +0000 (13:59 +0100)]
s4:idl add lsaRSetForestTrustInformation

Signed-off-by: Günther Deschner <gd@samba.org>
14 years agoRevert "Revert "s4-smbtorture: skip extended SetValue test against Samba (both dont...
Stefan Metzmacher [Tue, 16 Mar 2010 11:48:47 +0000 (12:48 +0100)]
Revert "Revert "s4-smbtorture: skip extended SetValue test against Samba (both dont survive).""

This reverts commit 508c218eb2f4bf8c45dc9d481576c87ed4fecbd3.

This lets make test fail.

Matthias: please make sure make test still passes when you change things like
this...(maybe add something to knownfail or so)

metze

14 years agos4:torture/rpc/dsgetinfo.c: fix name resolving for ldap_url
Stefan Metzmacher [Tue, 16 Mar 2010 13:25:11 +0000 (14:25 +0100)]
s4:torture/rpc/dsgetinfo.c: fix name resolving for ldap_url

metze

14 years agoUpdate copyright
Jim McDonough [Tue, 16 Mar 2010 14:04:51 +0000 (10:04 -0400)]
Update copyright

14 years agosecurity.idl - push generated code diff
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 14:00:33 +0000 (15:00 +0100)]
security.idl - push generated code diff

14 years agos4:resolve_oids LDB module - not really a change but a nicer method to call "talloc_r...
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 13:07:51 +0000 (14:07 +0100)]
s4:resolve_oids LDB module - not really a change but a nicer method to call "talloc_reference"

14 years agoDon't exit(0) on error
Jim McDonough [Tue, 16 Mar 2010 13:58:34 +0000 (09:58 -0400)]
Don't exit(0) on error

14 years agos3: vfs_smb_traffic_analyzer.c: add VFS functions for file open and close
Holger Hetterich [Mon, 15 Feb 2010 16:47:30 +0000 (17:47 +0100)]
s3: vfs_smb_traffic_analyzer.c: add VFS functions for file open and close

14 years agosmb_traffic_analyzer.c: optimize marshalling function and document
Holger Hetterich [Sun, 7 Feb 2010 19:39:58 +0000 (20:39 +0100)]
smb_traffic_analyzer.c: optimize marshalling function and document

Collect all data that is needed, and use only one talloc_asprintf
operation to create the string of common data. This simplifies
the code a bit and is most probably faster than the old method.

Also, #define SMBTA_COMMON_DATA_COUNT as a complete string,
speeding things up because we know the value at compile time.

14 years agovfs_smb_traffic_analyzer.c: added function
Holger Hetterich [Sat, 6 Feb 2010 10:36:14 +0000 (11:36 +0100)]
vfs_smb_traffic_analyzer.c: added function
static char *smb_traffic_analyzer_anonymize

This takes a lot of code out of the main functions,
and makes it a bit simpler. Do the anonymization in a function.
Since we already anonymized the username we don't need to do
this a second time in the v2 marshalling function.

14 years agoSimplify the code a bit by creating the functions:
Holger Hetterich [Thu, 4 Feb 2010 21:03:53 +0000 (22:03 +0100)]
Simplify the code a bit by creating the functions:
smb_traffic_analyzer_encrypt - doing the encryption of a data block,
smb_traffic_analyzer_create_header - create the protocol header,
smb_traffic_analyzer_write_data - actually write the data to the
socket.

14 years agoUpdate the manpage of vfs_smb_traffic_analyzer and add smbta-util.
Holger Hetterich [Sat, 30 Jan 2010 16:43:50 +0000 (17:43 +0100)]
Update the manpage of vfs_smb_traffic_analyzer and add smbta-util.

14 years agoAdd the number of common data blocks to the protocol.
Holger Hetterich [Tue, 2 Feb 2010 19:04:40 +0000 (20:04 +0100)]
Add the number of common data blocks to the protocol.

Always send the number of common data blocks first. This way, we
can make the protocol backwards compatible. A receiver running with
an older subprotocol can just ignore if a newer sender sends more
common data.

Add a few remarks to the marshalling function. Add two #define lines
defining the protocol subrelease number and the number of common
data blocks to the header file.

14 years agoPut all the protocol stuff into a separate header file.
Holger Hetterich [Tue, 2 Feb 2010 18:36:23 +0000 (19:36 +0100)]
Put all the protocol stuff into a separate header file.

All the structures and the vfs function identifier list is required
by the receiver. It's therefore very handy to have this in an extra
header file.

14 years agoAdd smbta-util to manage the encryption key.
Holger Hetterich [Mon, 1 Feb 2010 23:14:28 +0000 (00:14 +0100)]
Add smbta-util to manage the encryption key.

This program allows the administrator to enable or disable AES
encryption when using vfs_smb_traffic_analyzer. It also generates new
keys, stores them to a file, so that the file can be reused on another
client or server.

14 years agoImplement AES encryption of the data block.
Holger Hetterich [Fri, 29 Jan 2010 20:34:27 +0000 (21:34 +0100)]
Implement AES encryption of the data block.

First try. This runs on 16 bytes long AES block size, and enlarges the
data block with 16 bytes, to make sure all bytes are in. The added
bytes are filled with '.'. It then creates a header featuring the new
length to be send, and finally sends the data block, then returns.

This code is untested, as creating the receiver will be my next step.

To simplify traffic_analyzer's code, this code should run as a function.
It's on the do-to-list.

14 years agoImplement anonymization for protocol v2.
Holger Hetterich [Fri, 29 Jan 2010 13:57:20 +0000 (14:57 +0100)]
Implement anonymization for protocol v2.

Since we need to care for the SID too, do the anonymization in the
marshalling function and anonymize both the username and the SID.

Remove the 'A' status flag from the header definition. A listener
could see from the unencrypted header if the module is anonymizing
or not, which is certainly not wanted.

14 years agoMake all remarks compatible to the linux kernel coding styleguide.
Holger Hetterich [Sat, 23 Jan 2010 21:45:28 +0000 (22:45 +0100)]
Make all remarks compatible to the linux kernel coding styleguide.

14 years agoAdded an exact description of the V2 protocol.
Holger Hetterich [Sat, 23 Jan 2010 21:03:22 +0000 (22:03 +0100)]
Added an exact description of the V2 protocol.
I don't think it should have it's place the man page, because this is
developer information.

14 years agoMove the creation of the header.
Holger Hetterich [Fri, 22 Jan 2010 20:17:53 +0000 (21:17 +0100)]
Move the creation of the header.

Since the header block of the protocol contains the number of bytes to
come, we always send the header itself unmodified.
If we compress or crypt the data we are about to send, the length of the
data to send may change. Therefore, we no longer create the header in
smb_traffic_analyzer_create_string, but shortly before we send the data.
For both cases, encryption and normal, we create our own header, and
send it before the actual data.

In case of protocol v1, we don't need to create an extra header.
Just send the data, and return from the function.
Change a debug message to say that the header for crypted data has
been created.

Add a status flags consisting of 6 bytes to the header. Their function
will be descriped in one of the next patches, which is descriping
the header in a longer comment.
When anonymization and/or encryption is used, set the flags accordingly.

14 years agoFetch the SID of the user we are running as and send with the common
Holger Hetterich [Fri, 22 Jan 2010 13:55:33 +0000 (14:55 +0100)]
Fetch the SID of the user we are running as and send with the common
data.

14 years agoAdditionally send the vfs function id with the protocol.
Holger Hetterich [Fri, 22 Jan 2010 12:04:21 +0000 (13:04 +0100)]
Additionally send the vfs function id with the protocol.

14 years agoAccording to the linux kernel coding styleguide, it's better to
Holger Hetterich [Thu, 21 Jan 2010 22:26:54 +0000 (23:26 +0100)]
According to the linux kernel coding styleguide, it's better to
align the switch and it's case statements in the same column.
This saves us one indentation level.

14 years agoDon't use typedefs on the VFS function data structures as
Holger Hetterich [Thu, 21 Jan 2010 22:16:58 +0000 (23:16 +0100)]
Don't use typedefs on the VFS function data structures as
typedefs are evil according to the linux kernel coding
styleguide.

14 years agoAdd read,pread,write,pwrite support to the V2 protocol.
Holger Hetterich [Thu, 21 Jan 2010 21:31:09 +0000 (22:31 +0100)]
Add read,pread,write,pwrite support to the V2 protocol.

14 years agoEnable AES encryption of the data if a key was found in secrets.tdb.
Holger Hetterich [Mon, 14 Dec 2009 19:43:15 +0000 (20:43 +0100)]
Enable AES encryption of the data if a key was found in secrets.tdb.

14 years agoAdd rmdir, chdir, and rename as supported VFS functions
Holger Hetterich [Fri, 11 Dec 2009 20:04:46 +0000 (21:04 +0100)]
Add rmdir, chdir, and rename as supported VFS functions

14 years agoThe format of data we are sending over the network will be flexible when sending...
Holger Hetterich [Tue, 22 Sep 2009 18:01:35 +0000 (20:01 +0200)]
The format of data we are sending over the network will be flexible when sending over the network in protocol v2. To be able to do this, we create a new va-list function that is creating the buffer to send. Also it makes it easier for the receiver to parse the data; it sends an initial header containing the full length of the buffer to be send. For the individual strings, it sends sub headers containing the length of the upcoming substring to be send. With the header-data-header-data [..] structure we don't need to quote the sub strings finally enabling having all possible character sets in filenames etc..

In the sending function, implement mkdir to actually send it's data
for testing.

14 years agoCreate structs carrying the data of individual VFS functions, and hand those over...
Holger Hetterich [Mon, 21 Sep 2009 13:33:21 +0000 (15:33 +0200)]
Create structs carrying the data of individual VFS functions, and hand those over to the send function, which then casts the void pointer to the struct required by looking at the id. This allows us to return different result data depending on the VFS function that is running. Make the protocol v1 sender compatible to this. Adapt the existing VFS functions to use the new data structures. Make use of the new functionality and extend the mkdir VFS logger function to return the creation mode additionally.

14 years agoIntroduce smb_traffic_analyzer protocol v2.
Holger Hetterich [Thu, 17 Sep 2009 18:11:39 +0000 (20:11 +0200)]
Introduce smb_traffic_analyzer protocol v2.

From Holger:
Make smb_traffic_analyzer differ the protocol versions to enable the development of version 2 of the protocol. To do this, a new parameter "protocol_version" has been introduced, which can be set to "V1", "V2", or nothing. If protocol_version is not set, V1 will be chosen automatically.

Created an enum for identifying VFS functions in the upcoming protocol v2. Converted the existing VFS functions to use the identifier, and set the read/write bool used in protocol v1 accordingly, also ignore any other VFS functions except read/write/pread/pwrite in v1. Added a first new VFS function for mkdir, which I use for testing and implementing both the sender and receiver for v2.

14 years agos4:idl change level to type in lsa_ForestTrustRecord.
Simo Sorce [Fri, 26 Feb 2010 02:39:24 +0000 (21:39 -0500)]
s4:idl change level to type in lsa_ForestTrustRecord.

14 years agos4-smbtorture: avoid printf calls in RPC-WINREG test.
Günther Deschner [Tue, 16 Mar 2010 11:24:18 +0000 (12:24 +0100)]
s4-smbtorture: avoid printf calls in RPC-WINREG test.

Guenther

14 years agoAdded a net acl ds command for modification of ACLs on directory objects
Nadezhda Ivanova [Tue, 16 Mar 2010 11:06:08 +0000 (13:06 +0200)]
Added a net acl ds command for modification of ACLs on directory objects

At present the command supports only addition of control access rigts, done
so DRS access checks can be tested. It will be expanded to deal with most
ways to modify and view a DS ACL.
Shifted commands a bit. What used to be net acl is now "net acl nt" as apposed
to this, which is "net acl ds"

./bin/net acl ds set --help
Usage: set --objectdn=objectdn --car=control right --action=[deny|allow] --trusteedn=trustee-dn

Options:
  -h, --help            show this help message and exit
  --host=HOST           LDB URL for database or target server
  --car=CAR              The access control right to allow or deny
  --action=ACTION       Deny or allow access
  --objectdn=OBJECTDN   DN of the object whose SD to modify
  --trusteedn=TRUSTEEDN
                        DN of the entity that gets access

  Samba Common Options:
    -s FILE, --configfile=FILE
                        Configuration file

  Credentials Options:
    --simple-bind-dn=DN
                        DN to use for a simple bind
    --password=PASSWORD
                        Password
    -U USERNAME, --username=USERNAME
                        Username
    -W WORKGROUP, --workgroup=WORKGROUP
                        Workgroup
    -N, --no-pass       Don't ask for a password
    -k KERBEROS, --kerberos=KERBEROS
                        Use Kerberos

14 years agos3-spoolss: be very strict on OpenPrinter{Ex} failures for bad names.
Günther Deschner [Mon, 15 Mar 2010 23:01:16 +0000 (00:01 +0100)]
s3-spoolss: be very strict on OpenPrinter{Ex} failures for bad names.

Guenther

14 years agos4:dsdb - fix up warnings
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 08:48:58 +0000 (09:48 +0100)]
s4:dsdb - fix up warnings

14 years agos4:registry - use a macro for reverse byte order
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 08:40:11 +0000 (09:40 +0100)]
s4:registry - use a macro for reverse byte order

14 years agos4:dsdb Show more detail in failure to compute the aggregate DN.
Andrew Bartlett [Tue, 16 Mar 2010 03:56:32 +0000 (14:56 +1100)]
s4:dsdb Show more detail in failure to compute the aggregate DN.

Andrew Bartlett

14 years agos4:dsdb Change dsdb_get_schema() callers to use new talloc argument
Andrew Bartlett [Tue, 16 Mar 2010 03:52:39 +0000 (14:52 +1100)]
s4:dsdb Change dsdb_get_schema() callers to use new talloc argument

This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett

14 years agos4:dsdb Fix warnings in DEBUG() by casting to unsigned long int
Andrew Bartlett [Tue, 16 Mar 2010 03:46:31 +0000 (14:46 +1100)]
s4:dsdb Fix warnings in DEBUG() by casting to unsigned long int

14 years agos4:dsdb/acl Reduce calls to dsdb_get_schema() and add memory context
Andrew Bartlett [Tue, 16 Mar 2010 03:43:33 +0000 (14:43 +1100)]
s4:dsdb/acl Reduce calls to dsdb_get_schema() and add memory context

dsdb_get_schema() isn't a very cheap call, due to the use of LDB
opaque pointers.  We need to call it less, and instead pass it as a
parameter where possible.

This also changes to the new API with a talloc context.

Andrew Bartlett

14 years agos4:dsdb Add a memory context for dsdb_get_schema()
Andrew Bartlett [Tue, 16 Mar 2010 03:41:51 +0000 (14:41 +1100)]
s4:dsdb Add a memory context for dsdb_get_schema()

When specified, we talloc_reference onto this context to ensure that
pointers found in it are valid for the life of the objects they are
placed into.  (Such as the string form of LDAP attributes).

Andrew Bartlett

14 years agos4:dsdb Don't error out if we can't get the Aggregate schema DN yet
Andrew Bartlett [Tue, 16 Mar 2010 03:40:15 +0000 (14:40 +1100)]
s4:dsdb Don't error out if we can't get the Aggregate schema DN yet

It's easier to just set it up when we can, then to deal with the
ordering issues in ldb startup.  As long as we have it ready if a real
client ever asks for it, then we should be happy.

Andrew Bartlett

14 years agos4:registry - check also for other registry value types in the generic test
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 22:18:44 +0000 (23:18 +0100)]
s4:registry - check also for other registry value types in the generic test

14 years agos4:registry - add a test for the "REG_DWORD_BIG_ENDIAN" datatype
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 21:46:20 +0000 (22:46 +0100)]
s4:registry - add a test for the "REG_DWORD_BIG_ENDIAN" datatype

14 years agos4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatype
Matthias Dieter Wallnöfer [Mon, 15 Mar 2010 17:55:33 +0000 (18:55 +0100)]
s4:registry - introduce the "REG_DWORD_BIG_ENDIAN" datatype

It's like the normal REG_DWORD type but the byte order swapped

14 years agos4:dsdb/kcc/*.c - fix up wrong typed counters
Matthias Dieter Wallnöfer [Tue, 16 Mar 2010 07:49:22 +0000 (08:49 +0100)]
s4:dsdb/kcc/*.c - fix up wrong typed counters

14 years agos4-drs: Torture testcase for DS_REPL_INFO_METADATA_2_FOR_OBJ infoType of DsGetReplInfo()
Erick Nogueira do Nascimento [Mon, 15 Mar 2010 16:33:06 +0000 (13:33 -0300)]
s4-drs: Torture testcase for DS_REPL_INFO_METADATA_2_FOR_OBJ infoType of DsGetReplInfo()

This torture testcase considers both cases for this infoType: when the flag
DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE is enabled and when not.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-drs: DsGetReplInfo(), infoType = DS_REPL_INFO_METADATA_2_FOR_OBJ
Erick Nogueira do Nascimento [Mon, 15 Mar 2010 16:31:50 +0000 (13:31 -0300)]
s4-drs: DsGetReplInfo(), infoType = DS_REPL_INFO_METADATA_2_FOR_OBJ

Implementation of the DS_REPL_INFO_METADATA_2_FOR_OBJ infoType for DsGetReplInfo()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agoFix bug #7191 - WINS doesn't respond after > 86 #1c registrations.
Craig Miskell [Mon, 15 Mar 2010 23:20:44 +0000 (16:20 -0700)]
Fix bug #7191 - WINS doesn't respond after > 86 #1c registrations.

14 years agos3:registry-legacy: use talloc_stackframe() instead of NULL in regkey_open_internal()
Michael Adam [Mon, 15 Mar 2010 11:36:52 +0000 (12:36 +0100)]
s3:registry-legacy: use talloc_stackframe() instead of NULL in regkey_open_internal()

Michael

14 years agos3:smbcacls: also honour the "--sddl" flag when setting ACLs.
Michael Adam [Mon, 15 Mar 2010 11:16:52 +0000 (12:16 +0100)]
s3:smbcacls: also honour the "--sddl" flag when setting ACLs.

Michael

14 years agos3: Fix an uninitialized variable read
Volker Lendecke [Sun, 14 Mar 2010 20:18:34 +0000 (21:18 +0100)]
s3: Fix an uninitialized variable read

Found by Laurent Gaffie <laurent.gaffie@gmail.com>

Thanks for that,

Volker

14 years agoRemove the bool admin_user from conn struct. We no longer look at this to make access...
Jeremy Allison [Mon, 15 Mar 2010 22:39:41 +0000 (15:39 -0700)]
Remove the bool admin_user from conn struct. We no longer look at this to make access decisions.

Jeremy.