mat/samba.git
13 years agos4-dsdb: relax a bit the checks on read acl when dirsync control is specified
Matthieu Patou [Mon, 7 Mar 2011 22:02:32 +0000 (01:02 +0300)]
s4-dsdb: relax a bit the checks on read acl when dirsync control is specified

13 years agoAdd DSDB_CONTROL_DIRSYNC_RELAX_CHECK_OID for relaxing checks when doing dirsync
Matthieu Patou [Mon, 7 Feb 2011 06:57:01 +0000 (09:57 +0300)]
Add DSDB_CONTROL_DIRSYNC_RELAX_CHECK_OID for relaxing checks when doing dirsync

13 years agos4: change removal case for replPropertyMeta
Matthieu Patou [Mon, 7 Feb 2011 06:59:55 +0000 (09:59 +0300)]
s4: change removal case for replPropertyMeta

Change from remove unless asked to remove unless asked or if the
bypassoperational is specified

13 years agos4: do not change the critical flag when it's on a dirsync control
Matthieu Patou [Mon, 7 Feb 2011 06:58:17 +0000 (09:58 +0300)]
s4: do not change the critical flag when it's on a dirsync control

13 years agopyldb: minor fixup, fix a memory leak
Matthieu Patou [Sat, 26 Feb 2011 18:35:27 +0000 (21:35 +0300)]
pyldb: minor fixup, fix a memory leak

13 years agopyldb: add more tests for control manipulation
Matthieu Patou [Sat, 26 Feb 2011 18:34:43 +0000 (21:34 +0300)]
pyldb: add more tests for control manipulation

13 years agodsdb: read acl, sd can be null and ret == LDB_SUCCESS
Matthieu Patou [Mon, 7 Mar 2011 22:03:16 +0000 (01:03 +0300)]
dsdb: read acl, sd can be null and ret == LDB_SUCCESS

13 years agodsdb: acl_read fix a missed talloc_steal
Matthieu Patou [Sat, 5 Mar 2011 19:22:00 +0000 (22:22 +0300)]
dsdb: acl_read fix a missed talloc_steal

13 years agoupgradeprovision: Fix typo
Matthieu Patou [Sun, 27 Feb 2011 09:16:43 +0000 (12:16 +0300)]
upgradeprovision: Fix typo

13 years agoldb:fix control parsing for dirsync
Matthieu Patou [Fri, 4 Mar 2011 21:03:12 +0000 (00:03 +0300)]
ldb:fix control parsing for dirsync

13 years agoldapcli: allocate control value on the control object not on the control container
Matthieu Patou [Sat, 26 Feb 2011 18:07:51 +0000 (21:07 +0300)]
ldapcli: allocate control value on the control object not on the control container

13 years agos3: state->ev is not needed in winbindd_lookupsid
Volker Lendecke [Mon, 7 Mar 2011 19:04:48 +0000 (20:04 +0100)]
s3: state->ev is not needed in winbindd_lookupsid

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar  7 20:52:53 CET 2011 on sn-devel-104

13 years agoFix the examples/VFS build.
Jeremy Allison [Mon, 7 Mar 2011 12:46:20 +0000 (04:46 -0800)]
Fix the examples/VFS build.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Mar  7 15:11:25 CET 2011 on sn-devel-104

13 years agos3-docs: manpage for "net idmap delete"
Gregor Beck [Mon, 7 Mar 2011 08:57:10 +0000 (09:57 +0100)]
s3-docs: manpage for "net idmap delete"

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Mar  7 14:26:42 CET 2011 on sn-devel-104

13 years agos3-docs: manpage for "smbcontrol xx idmap"
Gregor Beck [Mon, 7 Mar 2011 08:56:48 +0000 (09:56 +0100)]
s3-docs: manpage for "smbcontrol xx idmap"

13 years agoFix examples/VFS to use correct prototypes for is_offline() and set_offline().
Jeremy Allison [Mon, 7 Mar 2011 11:53:11 +0000 (03:53 -0800)]
Fix examples/VFS to use correct prototypes for is_offline() and set_offline().

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Mar  7 13:39:17 CET 2011 on sn-devel-104

13 years agos3: Remove close_fn from idmap_methods
Volker Lendecke [Sun, 6 Mar 2011 11:02:05 +0000 (12:02 +0100)]
s3: Remove close_fn from idmap_methods

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104

13 years agos3-idmap-hash: Make "hashed_domains" properly talloced
Volker Lendecke [Sun, 6 Mar 2011 11:16:00 +0000 (12:16 +0100)]
s3-idmap-hash: Make "hashed_domains" properly talloced

13 years agos3: Replace idmap_ad_close by a destructor
Volker Lendecke [Sun, 6 Mar 2011 10:53:49 +0000 (11:53 +0100)]
s3: Replace idmap_ad_close by a destructor

13 years agos3-idmap-ad: Make ad_schema properly talloced
Volker Lendecke [Sun, 6 Mar 2011 10:47:19 +0000 (11:47 +0100)]
s3-idmap-ad: Make ad_schema properly talloced

13 years agos3-idmap-tdb: private_data is a talloc child of dom
Volker Lendecke [Sat, 26 Feb 2011 12:55:41 +0000 (13:55 +0100)]
s3-idmap-tdb: private_data is a talloc child of dom

13 years agos3-idmap-ldap: private_data is a talloc child of dom
Volker Lendecke [Sat, 26 Feb 2011 12:53:12 +0000 (13:53 +0100)]
s3-idmap-ldap: private_data is a talloc child of dom

13 years agos3-idmap-rid: private_data is a talloc child of dom
Volker Lendecke [Sat, 26 Feb 2011 12:49:37 +0000 (13:49 +0100)]
s3-idmap-rid: private_data is a talloc child of dom

13 years agos3: Remove an unnecessary if-statement
Volker Lendecke [Sat, 26 Feb 2011 12:43:55 +0000 (13:43 +0100)]
s3: Remove an unnecessary if-statement

13 years agos3: Remove an obsolete comment
Volker Lendecke [Sat, 26 Feb 2011 11:59:53 +0000 (12:59 +0100)]
s3: Remove an obsolete comment

13 years agos3: Remove some unused code
Volker Lendecke [Sat, 26 Feb 2011 11:55:34 +0000 (12:55 +0100)]
s3: Remove some unused code

13 years agos3: Remove unused args from nss_get_info_cached
Volker Lendecke [Sat, 26 Feb 2011 11:54:26 +0000 (12:54 +0100)]
s3: Remove unused args from nss_get_info_cached

13 years agos3: Remove unused args from nss_get_info
Volker Lendecke [Sat, 26 Feb 2011 11:52:20 +0000 (12:52 +0100)]
s3: Remove unused args from nss_get_info

13 years agos3: Remove unused args from get_nss_info
Volker Lendecke [Sat, 26 Feb 2011 11:50:46 +0000 (12:50 +0100)]
s3: Remove unused args from get_nss_info

13 years agos3: Move EXOP definitions to smbldap.h
Volker Lendecke [Sun, 6 Mar 2011 08:31:40 +0000 (09:31 +0100)]
s3: Move EXOP definitions to smbldap.h

This attempts to fix the build on Solaris

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 10:45:16 CET 2011 on sn-devel-104

13 years agos3: Fix uninitialized variables
Volker Lendecke [Sat, 5 Mar 2011 16:37:53 +0000 (17:37 +0100)]
s3: Fix uninitialized variables

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar  5 17:25:43 CET 2011 on sn-devel-104

13 years agoFix some nonempty blank lines
Volker Lendecke [Fri, 4 Mar 2011 19:27:57 +0000 (20:27 +0100)]
Fix some nonempty blank lines

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar  5 15:16:02 CET 2011 on sn-devel-104

13 years agowbinfo: Use wbcSidToStringBuf
Volker Lendecke [Fri, 4 Mar 2011 05:02:35 +0000 (06:02 +0100)]
wbinfo: Use wbcSidToStringBuf

13 years agowbinfo: Fix a debug message
Volker Lendecke [Fri, 4 Mar 2011 04:55:23 +0000 (05:55 +0100)]
wbinfo: Fix a debug message

13 years agos3-net: Use wbcSidToStringBuf
Volker Lendecke [Fri, 4 Mar 2011 04:53:10 +0000 (05:53 +0100)]
s3-net: Use wbcSidToStringBuf

13 years agopam_winbind: Use wbcSidToStringBuf
Volker Lendecke [Fri, 4 Mar 2011 04:49:20 +0000 (05:49 +0100)]
pam_winbind: Use wbcSidToStringBuf

13 years agolibwbclient: Use wbcSidToStringBuf
Volker Lendecke [Fri, 4 Mar 2011 04:44:23 +0000 (05:44 +0100)]
libwbclient: Use wbcSidToStringBuf

13 years agolibwbclient: Add wbcSidToStringBuf
Volker Lendecke [Fri, 4 Mar 2011 04:38:04 +0000 (05:38 +0100)]
libwbclient: Add wbcSidToStringBuf

13 years agonsswitch: wbcFreeMemory deals fine with NULL
Volker Lendecke [Thu, 3 Mar 2011 21:29:39 +0000 (22:29 +0100)]
nsswitch: wbcFreeMemory deals fine with NULL

13 years agos3: Fix a memory leak in check_sam_security_info3
Volker Lendecke [Sat, 5 Mar 2011 11:57:59 +0000 (12:57 +0100)]
s3: Fix a memory leak in check_sam_security_info3

Abartlet, this commit makes check_sam_security_info3 use talloc_tos() and also
cleans up the temporary talloc stackframe.

The old code created a temporary talloc context off "mem_ctx" but failed to
clean up the tmp_ctx in all but one return paths.

talloc_stackframe()/talloc_tos() is designed as a defense against exactly this
error: Even if we failed to free the frame when returning from the routine, it
would be cleaned up very soon, in our main event loop.

Please check this patch!

Thanks,

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar  5 14:08:37 CET 2011 on sn-devel-104

13 years agos3:test: the registry roundtrip test passes now
Michael Adam [Fri, 4 Mar 2011 23:58:19 +0000 (00:58 +0100)]
s3:test: the registry roundtrip test passes now

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Mar  5 02:19:33 CET 2011 on sn-devel-104

13 years agos3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test
Michael Adam [Fri, 4 Mar 2011 23:55:27 +0000 (00:55 +0100)]
s3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test

13 years agos3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter
Michael Adam [Fri, 4 Mar 2011 23:54:28 +0000 (00:54 +0100)]
s3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter

This is a synonym of lock directory which is already marked invalid.

13 years agos3:test: in net registry roundtrip test, exclude the files from exclude/logon
Michael Adam [Fri, 4 Mar 2011 23:50:21 +0000 (00:50 +0100)]
s3:test: in net registry roundtrip test, exclude the files from exclude/logon

These files are not samba config files...

13 years agos3:registry: fix invalid write in iconvert_talloc()
Michael Adam [Fri, 4 Mar 2011 22:53:44 +0000 (23:53 +0100)]
s3:registry: fix invalid write in iconvert_talloc()

For a non-preallocated dest-string and sourcestring of len < 2,
(one or both of the) final two two zero-bytes would be written
after the end of the allocated dest-string. The sourcelen did
not include the source string terminator. For longer strings,
this was not a problem because the dest-string would have been
reallocated in the convert-loop. This is fixed now by allocating
two extra bytes for the terminating 0-bytes that are needed anyways
in the initial allocation.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

13 years agos3:test: correctly react to each failing step in the net registry roundtrip tests
Michael Adam [Fri, 4 Mar 2011 22:17:02 +0000 (23:17 +0100)]
s3:test: correctly react to each failing step in the net registry roundtrip tests

13 years agos3:test: improve logging in the net registry roundtrip test steps
Michael Adam [Fri, 4 Mar 2011 22:12:08 +0000 (23:12 +0100)]
s3:test: improve logging in the net registry roundtrip test steps

13 years agos4:operational LDB module - fix attribute names to be right up/down-cased
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 22:02:29 +0000 (23:02 +0100)]
s4:operational LDB module - fix attribute names to be right up/down-cased

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Mar  4 23:56:07 CET 2011 on sn-devel-104

13 years agos4:ldap.py - rootdse tests should search for the rootDSE not the default DN
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 21:49:46 +0000 (22:49 +0100)]
s4:ldap.py - rootdse tests should search for the rootDSE not the default DN

Reviewed by: Tridge

13 years agos4:ldap.py - add a test in order to show the operational module fixed
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 21:49:08 +0000 (22:49 +0100)]
s4:ldap.py - add a test in order to show the operational module fixed

Reviewed by: Tridge

13 years agos4:operational LDB module - fix display of some constructed attributes
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 21:39:42 +0000 (22:39 +0100)]
s4:operational LDB module - fix display of some constructed attributes

"structuralObjectClass", "createTimestamp" and "modifyTimestamp" weren't
displayed anymore.

Reviewed by: Tridge

13 years agos4:operational LDB module - add "groupToken" as unsigned int (uint32_t)
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 21:30:15 +0000 (22:30 +0100)]
s4:operational LDB module - add "groupToken" as unsigned int (uint32_t)

Reviewed by: Tridge

13 years agos4:operational LDB module - readd "structuralObjectClass" -> "objectClass" mapping
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 21:14:11 +0000 (22:14 +0100)]
s4:operational LDB module - readd "structuralObjectClass" -> "objectClass" mapping

This has been removed accidentally by commit
a093e10896a4768dba0cd793a04b7d5d1366fee2.

Reviewed by: Tridge

13 years agoldb:ldb_msg.c - use LDB result constants for checking return values
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 19:51:07 +0000 (20:51 +0100)]
ldb:ldb_msg.c - use LDB result constants for checking return values

Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Mar  4 22:51:57 CET 2011 on sn-devel-104

13 years agos4:ldap.py - other important RDN check testcases
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 08:27:51 +0000 (09:27 +0100)]
s4:ldap.py - other important RDN check testcases

Reviewed by: Tridge

13 years agos4:ldap.py - remove a debug output
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 08:26:40 +0000 (09:26 +0100)]
s4:ldap.py - remove a debug output

This has only been needed for developing this testcase and has been
forgotten to be removed afterwards.

Reviewed by: Tridge

13 years agoldb:rdn_name LDB module - more RDN constraint checks (from AD)
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 10:11:08 +0000 (11:11 +0100)]
ldb:rdn_name LDB module - more RDN constraint checks (from AD)

Reviewed by: Tridge

13 years agos4/ldb - remove now superflous "ldb_dn_validate" checks
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 09:49:47 +0000 (10:49 +0100)]
s4/ldb - remove now superflous "ldb_dn_validate" checks

If we immediately afterwards perform an LDB base operation then we don't
need an explicit "ldb_dn_validate" check anymore (only OOM makes sense).

Reviewed by: Tridge

13 years agos4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate"
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 09:44:22 +0000 (10:44 +0100)]
s4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate"

"ldb_dn_validate" is NULL-safe and does the check implicitly.

Reviewed by: Tridge

13 years agoRevert "s4:objectclass LDB module - if we cannot find DN's parent then the DN itself...
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 09:15:59 +0000 (10:15 +0100)]
Revert "s4:objectclass LDB module - if we cannot find DN's parent then the DN itself is invalid"

This is not needed anymore with the new DN checking.

This reverts commit 5896b7299331aedd065397d2078c62d85bcf68f6.

Reviewed by: Tridge

13 years agoldb:ldb_request - handle here the DN checks
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 09:14:14 +0000 (10:14 +0100)]
ldb:ldb_request - handle here the DN checks

This is a much better solution than we had before - so all important DN
checks are enforced for each type of LDB database (and not limited to DSDB).

Many "ldb_dn_validate" checks will now become obsolete.

Reviewed by: Tridge

13 years agos4:objectclass LDB module - fix a comment
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 08:33:52 +0000 (09:33 +0100)]
s4:objectclass LDB module - fix a comment

Reviewed by: Tridge

13 years agos4:libnet/libnet_site.c - make use of LDB return constants
Matthias Dieter Wallnöfer [Fri, 4 Mar 2011 09:40:27 +0000 (10:40 +0100)]
s4:libnet/libnet_site.c - make use of LDB return constants

Reviewed by: Tridge

13 years agos4:waf-build fix disable-shared build for smbtorture
Christian Ambach [Fri, 4 Mar 2011 17:45:20 +0000 (18:45 +0100)]
s4:waf-build fix disable-shared build for smbtorture

building smbtorture4 with configure --disable-shared failed
with an error that ldb.h could not be found

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed by: Tridge

13 years agos4:selftest: test using the machine account of the rodc against itself
Stefan Metzmacher [Fri, 4 Mar 2011 15:57:28 +0000 (16:57 +0100)]
s4:selftest: test using the machine account of the rodc against itself

This should test the non proxy rodc kdc path.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar  4 22:06:10 CET 2011 on sn-devel-104

13 years agoselftest/target/Samba4: regenerate the krb5.conf after the rodc join
Stefan Metzmacher [Fri, 4 Mar 2011 09:05:51 +0000 (10:05 +0100)]
selftest/target/Samba4: regenerate the krb5.conf after the rodc join

The RODC should be used as KDC, which will forward requests to the RWDC
if required.

metze

13 years agoselftest/target/Samba4: splitout a mk_krb5_conf() function
Stefan Metzmacher [Fri, 4 Mar 2011 09:05:13 +0000 (10:05 +0100)]
selftest/target/Samba4: splitout a mk_krb5_conf() function

metze

13 years agos4:kdc: split the kdc_tcp_proxy() logic from the main kdc logic
Stefan Metzmacher [Wed, 9 Feb 2011 11:17:23 +0000 (12:17 +0100)]
s4:kdc: split the kdc_tcp_proxy() logic from the main kdc logic

By having kdc_tcp_proxy_send/recv(), which just asks any writeable
dc for a reponse blob, we simplify the interaction between
client-local and local-writeable sockets.

This allows us to make kdc_socket, kdc_process_fn_t, kdc_tcp_call and kdc_tcp_socket
private to kdc.c again.

metze

13 years agos4:kdc: split the kdc_udp_proxy() logic from the main kdc logic
Stefan Metzmacher [Wed, 9 Feb 2011 08:07:47 +0000 (09:07 +0100)]
s4:kdc: split the kdc_udp_proxy() logic from the main kdc logic

By having kdc_udp_proxy_send/recv(), which just asks any writeable
dc for a reponse blob, we simplify the interaction between
client-local and local-writeable sockets.

This allows us to make kdc_udp_call and kdc_udp_socket private to
kdc.c again.

metze

13 years agos4:kdc: add a kdc_proxy_unavailable_error() helper function
Stefan Metzmacher [Wed, 9 Feb 2011 08:06:20 +0000 (09:06 +0100)]
s4:kdc: add a kdc_proxy_unavailable_error() helper function

metze

13 years agos4:kdc: fix calculation of the rodc kvno
Stefan Metzmacher [Fri, 4 Mar 2011 15:12:29 +0000 (16:12 +0100)]
s4:kdc: fix calculation of the rodc kvno

Bit shifting is non-trivial in C:-)

This

int32_t a = 0x12340000;
uint32_t b = (a >> 16);

results in 0x00001234, but this

int32_t a = 0xEDCB0000;
uint32_t b = (a >> 16);

results in 0xFFFFEDCB, while we expected 0x0000EDCB.

metze

13 years agoHEIMDAL:kdc: correctly propagate HDB_ERR_NOT_FOUND_HERE to via tgs_parse_request...
Stefan Metzmacher [Fri, 4 Mar 2011 13:33:02 +0000 (14:33 +0100)]
HEIMDAL:kdc: correctly propagate HDB_ERR_NOT_FOUND_HERE to via tgs_parse_request() and _kdc_tgs_rep()

metze

13 years agolib/socket_wrapper: try to fix the build on solaris
Stefan Metzmacher [Fri, 4 Mar 2011 20:14:27 +0000 (21:14 +0100)]
lib/socket_wrapper: try to fix the build on solaris

struct msg does not contain msg_control, msg_controllen and msg_flags
on solaris.

metze

13 years agos3: add two missing vfs disconnect calls
David Disseldorp [Fri, 4 Mar 2011 13:53:39 +0000 (14:53 +0100)]
s3: add two missing vfs disconnect calls

The fix for bug 7976 added a vfs connect call to create_conn_struct.
This change adds two further disconnect calls that were missed by the
original change.

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Mar  4 16:33:53 CET 2011 on sn-devel-104

13 years agos3-printing: fix cups pcap reload with no printers
David Disseldorp [Thu, 30 Dec 2010 14:58:48 +0000 (15:58 +0100)]
s3-printing: fix cups pcap reload with no printers

cups_async_callback() is called to receive new printcap data from a
child process which requests the information from cupsd.
Newly received printcap information is stored in a temporary printcap
cache (tmp_pcap_cache). Once the child process closes the printcap IPC
file descriptor, the system printcap cache is replaced with the newly
populated tmp_pcap_cache, however this only occurs if tmp_pcap_cache is
non null (has at least one printer).

If the printcap cache is empty, which is the case when cups is not
exporting any printers, the printcap cache is not replaced resulting in
stale data.

https://bugzilla.samba.org/show_bug.cgi?id=7915
Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-printing: remove unneeded local_pcap_copy global
David Disseldorp [Thu, 30 Dec 2010 13:32:29 +0000 (14:32 +0100)]
s3-printing: remove unneeded local_pcap_copy global

The cups local_pcap_copy global served as a temporary buffer during
asynchronous cups printcap cache updates, as well as indicating when
the printcap cache had not yet been filled and printcap cache update
should block.

As smbd printcap reads are now triggered by the parent smbd following
printcap cache update, the variable and blocking mechanism are no longer
needed.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-printing: follow force user/group for driver IO
David Disseldorp [Wed, 2 Mar 2011 13:34:28 +0000 (14:34 +0100)]
s3-printing: follow force user/group for driver IO

Configuring force user/group settings for the print$ share currently has
unexpected results, this is explained by how the driver upload/add
process takes place. Consider the following example:

[print$]
        path = /print-drv
        write list = $DRIVER_UPLOAD_USER
        force group = ntadmin

- the client connects to the [print$] share and uploads all driver
  files to the /print-drv/W32X86 directory.

- This is permitted, as /print-drv/W32X86 is owned by group ntadmin, and
  the "force group = ntadmin" takes effect for the [print$] session.

- Once all files are uploaded, the client connects to the [ipc$]
  share and issues an AddPrinterDriverEx spoolss request.

- In handling this request move_driver_to_download_area() is called,
  which attempts to create the directory /print-drv/W32X86/3

- The create directory fails, as it is done as the user connected to
  the [ipc$] share which does not have permission to write to the driver
  directory. The [print$] "force group = ntadmin" has no effect.

This is a regression from previous behaviour prior to the commit:
783ab04 Convert move_driver_to_download_area to use create_conn_struct.

https://bugzilla.samba.org/show_bug.cgi?id=7921
Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agoldb:ldb tools - remove a superflous "return" (usage internally calls "exit")
Matthias Dieter Wallnöfer [Wed, 2 Mar 2011 21:46:03 +0000 (22:46 +0100)]
ldb:ldb tools - remove a superflous "return" (usage internally calls "exit")

Reviewed by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Mar  4 09:39:22 CET 2011 on sn-devel-104

13 years agoldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parameters
Matthias Dieter Wallnöfer [Wed, 2 Mar 2011 21:40:13 +0000 (22:40 +0100)]
ldb:ldb tools - return LDB_ERR_INVALID_DN_SYNTAX on wrong DN parameters

Not all LDB databases have further DN checks.

Reviewed by: Tridge

13 years agoldb:ldb tools - ldbtest - convert other result values to LDB codes as well
Matthias Dieter Wallnöfer [Wed, 2 Mar 2011 21:28:27 +0000 (22:28 +0100)]
ldb:ldb tools - ldbtest - convert other result values to LDB codes as well

I've forgotten this in my first patchset.

Reviewed by: Tridge

13 years agos4:LDAP server - remove validation checks of input DNs
Matthias Dieter Wallnöfer [Wed, 2 Mar 2011 18:14:01 +0000 (19:14 +0100)]
s4:LDAP server - remove validation checks of input DNs

We should rather try to let the LDB modules perform these checks
otherwise different backends behaviour differently.

Reviewed by: Tridge

13 years agos4:objectclass LDB module - if we cannot find DN's parent then the DN itself is invalid
Matthias Dieter Wallnöfer [Wed, 2 Mar 2011 17:50:11 +0000 (18:50 +0100)]
s4:objectclass LDB module - if we cannot find DN's parent then the DN itself is invalid

ERR_INVALID_DN_SYNTAX fits better than ERR_OPERATION_ERROR in this case. This
one gets triggered if we perform "add" requests without the LDAP server.

Reviewed by: Tridge

13 years agodebug: fixed a valgrind error
Andrew Tridgell [Fri, 4 Mar 2011 01:23:16 +0000 (12:23 +1100)]
debug: fixed a valgrind error

Thanks to Volker for spotting this one!

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Mar  4 03:09:52 CET 2011 on sn-devel-104

13 years agos3-waf: add wildcard commands from main wscript.
Günther Deschner [Wed, 2 Mar 2011 22:13:29 +0000 (23:13 +0100)]
s3-waf: add wildcard commands from main wscript.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar  4 02:11:11 CET 2011 on sn-devel-104

13 years agos3-nterr: use strcasecmp in nt_status_string_to_code().
Günther Deschner [Thu, 3 Mar 2011 00:11:43 +0000 (01:11 +0100)]
s3-nterr: use strcasecmp in nt_status_string_to_code().

Guenther

13 years agos4-nterr: move auth_nt_status_squash to nt_status_squash and move to nterr.c
Günther Deschner [Thu, 3 Mar 2011 00:05:33 +0000 (01:05 +0100)]
s4-nterr: move auth_nt_status_squash to nt_status_squash and move to nterr.c

Guenther

13 years agos4-nterr: some minor cosmetic edits to further match s3 nterr.
Günther Deschner [Wed, 2 Mar 2011 23:41:11 +0000 (00:41 +0100)]
s4-nterr: some minor cosmetic edits to further match s3 nterr.

Guenther

13 years agos3-nterr: within nt_errstr() compare codes using NT_STATUS_V().
Günther Deschner [Wed, 2 Mar 2011 23:39:44 +0000 (00:39 +0100)]
s3-nterr: within nt_errstr() compare codes using NT_STATUS_V().

This is to avoid future very special NT_STATUS_EQUAL semantics within s4.

Guenther

13 years agonterr: make sure both nt_err_desc structs are the same.
Günther Deschner [Wed, 2 Mar 2011 23:06:13 +0000 (00:06 +0100)]
nterr: make sure both nt_err_desc structs are the same.

Guenther

13 years agonterr: make sure both nt_errs structs are the same.
Günther Deschner [Wed, 2 Mar 2011 22:51:56 +0000 (23:51 +0100)]
nterr: make sure both nt_errs structs are the same.

Guenther

13 years agos4-nterr: add _N macro handling as in s3-nterr.
Günther Deschner [Wed, 2 Mar 2011 22:40:58 +0000 (23:40 +0100)]
s4-nterr: add _N macro handling as in s3-nterr.

Guenther

13 years agos3-nterr: make nt_err_desc static const.
Günther Deschner [Wed, 2 Mar 2011 22:40:05 +0000 (23:40 +0100)]
s3-nterr: make nt_err_desc static const.

Guenther

13 years agonterr: remove space indents (use tabs instead), following coding standards.
Günther Deschner [Thu, 3 Mar 2011 00:16:22 +0000 (01:16 +0100)]
nterr: remove space indents (use tabs instead), following coding standards.

Guenther

13 years agonterr: remove trailing whitespace.
Günther Deschner [Wed, 2 Mar 2011 22:16:35 +0000 (23:16 +0100)]
nterr: remove trailing whitespace.

Guenther

13 years agos3-waf: add check for SEEKDIR_RETURNS_VOID.
Günther Deschner [Thu, 3 Mar 2011 21:55:09 +0000 (22:55 +0100)]
s3-waf: add check for SEEKDIR_RETURNS_VOID.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar  4 01:13:54 CET 2011 on sn-devel-104

13 years agos3-waf: add check for HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR.
Günther Deschner [Thu, 3 Mar 2011 21:10:40 +0000 (22:10 +0100)]
s3-waf: add check for HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR.

Guenther

13 years agolibreplace: move "struct timespec" checks into libreplace (where timespec is already...
Günther Deschner [Thu, 3 Mar 2011 15:26:48 +0000 (16:26 +0100)]
libreplace: move "struct timespec" checks into libreplace (where timespec is already used).

Bjoern, Metze, please check.

Guenther

13 years agosocket_wrapper: use swrap_sendmsg_before()/after() in swrap_writev()
Stefan Metzmacher [Sat, 30 Oct 2010 14:23:49 +0000 (16:23 +0200)]
socket_wrapper: use swrap_sendmsg_before()/after() in swrap_writev()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar  3 23:43:39 CET 2011 on sn-devel-104

13 years agosocket_wrapper: use swrap_sendmsg_before()/after() in swrap_sendmsg()
Stefan Metzmacher [Sat, 30 Oct 2010 14:23:49 +0000 (16:23 +0200)]
socket_wrapper: use swrap_sendmsg_before()/after() in swrap_sendmsg()

This also adds the same logic for broadcast as in swrap_sendto()
for SOCK_DGRAM.

metze

13 years agosocket_wrapper: use swrap_sendmsg_before()/after() in swrap_send()
Stefan Metzmacher [Sat, 30 Oct 2010 14:23:49 +0000 (16:23 +0200)]
socket_wrapper: use swrap_sendmsg_before()/after() in swrap_send()

metze