kai/samba.git
16 years agoAlways trust the domain flags in the wcache trusted domain cache.
Gerald W. Carter [Fri, 25 Jan 2008 18:21:14 +0000 (12:21 -0600)]
Always trust the domain flags in the wcache trusted domain cache.

Use the flags stored in the tdb when determining if a domain can
be contacted.  The tdb should be considered authoratative anyways unless
you know the flags in the winbindd_domain are correct (such as when
first enumerating trusts).

Original suggestion and patch from Steven Danneman <steven.danneman@isilon.com>.
Manually rewritten by me for 3.2.
(This used to be commit f53658a20de07a29abbe2e90917b328d00fc0024)

16 years agoUse the correct domain name when looking up the trust password.
Gerald W. Carter [Fri, 25 Jan 2008 18:18:05 +0000 (12:18 -0600)]
Use the correct domain name when looking up the trust password.

On a DC, we always use the domain name given.  On a domain member,
we use lp_workgroup().  This fixes a bug supporting trusted domains.
(This used to be commit 8b063a414149bdf401a8f854d55ed7dc6f94cb60)

16 years agoRemove more unused LSA marshalling functions.
Günther Deschner [Fri, 25 Jan 2008 15:57:55 +0000 (16:57 +0100)]
Remove more unused LSA marshalling functions.

Guenther
(This used to be commit 95e0fb452bda4c81b26e3dec4953bbba37940467)

16 years agoRemove some unused structures from rpc_lsa.h.
Günther Deschner [Fri, 25 Jan 2008 15:40:51 +0000 (16:40 +0100)]
Remove some unused structures from rpc_lsa.h.

Guenther
(This used to be commit a52066e6083ff4b0d21b57ba43a812c02c0cbd78)

16 years agoAdd cmd_netlogon_dsr_enumtrustdom() to rpcclient.
Günther Deschner [Fri, 25 Jan 2008 15:35:09 +0000 (16:35 +0100)]
Add cmd_netlogon_dsr_enumtrustdom() to rpcclient.

Guenther
(This used to be commit cb44c901c1bc66da9f3636020401238ce0005105)

16 years agorun "make idl".
Günther Deschner [Fri, 25 Jan 2008 15:33:36 +0000 (16:33 +0100)]
run "make idl".

Guenther
(This used to be commit 5db4310d4c9149dc9d68f7684dc961926f94544a)

16 years agoFix netr_DsrEnumerateDomainTrusts IDL.
Günther Deschner [Fri, 25 Jan 2008 15:20:47 +0000 (16:20 +0100)]
Fix netr_DsrEnumerateDomainTrusts IDL.

Guenther
(This used to be commit 527aae96a6c2da822a21996ba4e6f7df1941fdbc)

16 years agoAdd LIBNETAPI_LOCAL_SERVER() macro.
Günther Deschner [Fri, 25 Jan 2008 14:46:11 +0000 (15:46 +0100)]
Add LIBNETAPI_LOCAL_SERVER() macro.

Guenther
(This used to be commit 4bdcf07bcc3aaf7c3f7245cfdda06433bcf4ae60)

16 years agoNo need to close registry on libnetapi_free() anymore.
Günther Deschner [Fri, 25 Jan 2008 14:45:38 +0000 (15:45 +0100)]
No need to close registry on libnetapi_free() anymore.

Guenther
(This used to be commit 6bf75652ef07f5a534cef5034b7aad4fdcbcd265)

16 years agoFix winbindd_can_contact_domain() on a samba DC.
Michael Adam [Fri, 25 Jan 2008 15:40:17 +0000 (16:40 +0100)]
Fix winbindd_can_contact_domain() on a samba DC.

The check for inbound trusts is invalid when samba is a DC
and has a trust with an active directory domain.

This effectively prevented tusts with an AD domain on a
samba DC from working (unless using "winbindd rpc only"),
because an ads_connect() was never performed. Only the
rpc-based winbindd methods were working properly.

Jerry: Please check!

Michael
(This used to be commit dcd42a1e0642c69348adfaeecef7f7f2f074ac30)

16 years agoUse generated DSSETUP client & server rpc functions and remove the hand-written ones.
Günther Deschner [Fri, 25 Jan 2008 12:26:10 +0000 (13:26 +0100)]
Use generated DSSETUP client & server rpc functions and remove the hand-written ones.

Guenther
(This used to be commit d5ebfccebb1f1b56b45673a506fcdb414103c43b)

16 years agoAdd generated dssetup code after make idl.
Günther Deschner [Fri, 25 Jan 2008 12:04:58 +0000 (13:04 +0100)]
Add generated dssetup code after make idl.

Guenther
(This used to be commit 4b3d96be8017a38a6af4ce58ae54a6af005fbe3e)

16 years agoAdding dssetup.idl from samba4.
Günther Deschner [Fri, 25 Jan 2008 12:03:03 +0000 (13:03 +0100)]
Adding dssetup.idl from samba4.

Guenther
(This used to be commit d33a5102c294880ae5f6341575f587f32fb14d0c)

16 years agoRemove rpccli_samr_get_dom_pwinfo() and rpccli_samr_get_usrdom_pwinfo().
Günther Deschner [Fri, 25 Jan 2008 00:26:27 +0000 (01:26 +0100)]
Remove rpccli_samr_get_dom_pwinfo() and rpccli_samr_get_usrdom_pwinfo().

Guenther
(This used to be commit 29690d18608ab2d694c23ed7656348c8c71f204e)

16 years agoFix the same bug with user -> user_obj.
Jeremy Allison [Fri, 25 Jan 2008 02:22:43 +0000 (18:22 -0800)]
Fix the same bug with user -> user_obj.
Jeremy.
(This used to be commit c5edf7456955471b8590c2cfa67c7f47a387cdf0)

16 years agoFix a really subtle old, old bug :-). When canonicalizing the
Jeremy Allison [Fri, 25 Jan 2008 02:13:22 +0000 (18:13 -0800)]
Fix a really subtle old, old bug :-). When canonicalizing the
NT ACL into a POSIX one, if the group being set is the primary group
of the file, map it into a SMB_ACL_GROUP_OBJ, not a SMB_ACL_GROUP.
Otherwise we get an extra bogus group entry in the POSIX ACL.
Jeremy.
(This used to be commit 4d302254fdfce2c267cf6b21f662d5aa2dc9c72c)

16 years agoCorrectly set flags in ACE's inherited from parent. Still one bug
Jeremy Allison [Fri, 25 Jan 2008 01:50:07 +0000 (17:50 -0800)]
Correctly set flags in ACE's inherited from parent. Still one bug
left to find then I'll back-port to 3.0.28.
Jeremy.
(This used to be commit 3df2f7ca782e418703d82f7a1f3c035a365f9589)

16 years agoFix missing error check that caused crash when winbindd not running.
Jeremy Allison [Fri, 25 Jan 2008 01:40:35 +0000 (17:40 -0800)]
Fix missing error check that caused crash when winbindd not running.
Jeremy.
(This used to be commit f5ca241e2c1adf2ae836fae33a4adac916f46416)

16 years agoFix lookup_sids to detect unix_groups and unix_users domain sids.
Michael Adam [Fri, 25 Jan 2008 00:40:42 +0000 (01:40 +0100)]
Fix lookup_sids to detect unix_groups and unix_users domain sids.

This fixes panics in wbcLookupRids when 1-2-22 was passed as a
domain sid.

Michael
(This used to be commit c0d9732cf4482b0db02c75f316ff2b41f3336425)

16 years agoAdd a debug message: show the sid lookup_sid() was called for.
Michael Adam [Fri, 25 Jan 2008 00:40:01 +0000 (01:40 +0100)]
Add a debug message: show the sid lookup_sid() was called for.

Michael
(This used to be commit 6c7c6c3f85a4bd171c62031b2b8e59d3f7054061)

16 years agoAdd debug message: show which domain_child is being forked.
Michael Adam [Fri, 25 Jan 2008 00:21:56 +0000 (01:21 +0100)]
Add debug message: show which domain_child is being forked.

Michael
(This used to be commit 373a00ae0d667d257fa93ab14c773e841f2c4f1a)

16 years agoAdd a debug message to lookup_rids() printing the domain SID.
Michael Adam [Thu, 24 Jan 2008 22:44:05 +0000 (23:44 +0100)]
Add a debug message to lookup_rids() printing the domain SID.

This is to ease debugging. I sporadically get panics that are
apparently due to NULL domain sid passed to lookup_rids somewhere.

Michael
(This used to be commit 723e877c241dd5a0c8addb89507c9eda75b88ea4)

16 years agoAdd a debug message winbindd_can_contact_domain()
Michael Adam [Thu, 24 Jan 2008 21:15:33 +0000 (22:15 +0100)]
Add a debug message winbindd_can_contact_domain()

explaining the reason for failure.

Michael
(This used to be commit ba5373ed7f74d560a9de8620039b596b8938d1dc)

16 years agoFix assignment to request->data.init_conn.is_primary in init_child_connection().
Michael Adam [Thu, 24 Jan 2008 21:47:49 +0000 (22:47 +0100)]
Fix assignment to request->data.init_conn.is_primary in init_child_connection().

The present assignment
"request->data.init_conn.is_primary = domain->internal ? False : True"
simply feels wrong. This seems to be the thing right to do:
"request->data.init_conn.is_primary = domain->primary ? true : false".

The question is: Does this have any purpose at all?
data.init_conn.is_primary seems to be used nowhere
in the whole code at all.

Is it (still) needed?

Michael
(This used to be commit 8bb21b8b3802e7b093a3c4fb41b8550033388878)

16 years agoMerge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
Jeremy Allison [Fri, 25 Jan 2008 00:16:40 +0000 (16:16 -0800)]
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit ef2913a66c3888d4813d8b778ddd63b2c7e48f3e)

16 years agoMake explicit in debug we're ignoring flags from the parent SD.
Jeremy Allison [Fri, 25 Jan 2008 00:13:53 +0000 (16:13 -0800)]
Make explicit in debug we're ignoring flags from the parent SD.
Jeremy
(This used to be commit 58cfa4b1bdc1ce30cc3befb342cc98ac0e283585)

16 years agoTrying to avoid defining new SAMR acct creation flags when we already have them with...
Günther Deschner [Fri, 25 Jan 2008 00:00:51 +0000 (01:00 +0100)]
Trying to avoid defining new SAMR acct creation flags when we already have them with different
names. Matt, Jeremy, please check.

Guenther
(This used to be commit d4a9e46edf7336f673c001c559af96eb0ecf9f6f)

16 years agoRe-run make idl.
Günther Deschner [Thu, 24 Jan 2008 23:11:58 +0000 (00:11 +0100)]
Re-run make idl.

Guenther
(This used to be commit c0bf3af692bee5bc5a3405feb405e67d35d77a16)

16 years agoRename samr_*AccessMask bitfields to start with SAMR_.
Günther Deschner [Thu, 24 Jan 2008 22:52:16 +0000 (23:52 +0100)]
Rename samr_*AccessMask bitfields to start with SAMR_.

Guenther
(This used to be commit 6226f2294e83501d01d18a954bb36efec37aea75)

16 years agoAdd WERR_INVALID_COMPUTER_NAME.
Günther Deschner [Thu, 24 Jan 2008 22:39:38 +0000 (23:39 +0100)]
Add WERR_INVALID_COMPUTER_NAME.

Guenther
(This used to be commit cb1ff32eff06031150a6821658152e02a4077bbd)

16 years agoAdd cmd_netlogon_gettrustrid() to rpcclient.
Günther Deschner [Thu, 24 Jan 2008 22:38:43 +0000 (23:38 +0100)]
Add cmd_netlogon_gettrustrid() to rpcclient.

Guenther
(This used to be commit 231a4d051f24af7cf5bf13d7dd613f33dc06f21a)

16 years agomake idl.
Günther Deschner [Thu, 24 Jan 2008 22:37:57 +0000 (23:37 +0100)]
make idl.

Guenther
(This used to be commit 212f6fc000d093bad9f78307743639b391db3fe5)

16 years agoAdd IDL for netr_LogonGetTrustRid.
Günther Deschner [Thu, 24 Jan 2008 22:35:02 +0000 (23:35 +0100)]
Add IDL for netr_LogonGetTrustRid.

Guenther
(This used to be commit 6f38c2f06080943bb64ce24115ec2164b6c21b95)

16 years agoAdd debug messages to trace this if needed.
Jeremy Allison [Thu, 24 Jan 2008 21:27:00 +0000 (13:27 -0800)]
Add debug messages to trace this if needed.
Jeremy.
(This used to be commit b628269b3260661cb4eeeab8c533b3129827ba62)

16 years agoThe checks for OI and CI were just wrong.... Fix them. Thanks to
Jeremy Allison [Thu, 24 Jan 2008 21:06:11 +0000 (13:06 -0800)]
The checks for OI and CI were just wrong.... Fix them. Thanks to
Jim for testing this.
Jeremy.
(This used to be commit e898789e0d819df05b14bcedfa1d230c7a983440)

16 years agoFirst part of fix for bug #4929 - worked out by jmcd.
Jeremy Allison [Thu, 24 Jan 2008 20:59:08 +0000 (12:59 -0800)]
First part of fix for bug #4929 - worked out by jmcd.
Cope with protected ACL set correctly.
Jeremy.
(This used to be commit f5e50f42e7c79b4f8857602457db5b97886bd19e)

16 years agoFix winbindd build w/o ADS.
Günther Deschner [Thu, 24 Jan 2008 16:39:29 +0000 (17:39 +0100)]
Fix winbindd build w/o ADS.

Guenther
(This used to be commit 40daef4c3d822a28467ff521efca6a55a0370050)

16 years agoFix Coverity ID 454
Volker Lendecke [Thu, 24 Jan 2008 15:12:42 +0000 (16:12 +0100)]
Fix Coverity ID 454
(This used to be commit 902d1d6709e47fbc8b538f28cb4364b006c431f8)

16 years agoFix Coverity ID 463
Volker Lendecke [Thu, 24 Jan 2008 14:57:00 +0000 (15:57 +0100)]
Fix Coverity ID 463
(This used to be commit 21d126c56a633d2d72ffad08db7331ecc0ee3c0c)

16 years agoFix Coverity ID 465
Volker Lendecke [Thu, 24 Jan 2008 14:52:45 +0000 (15:52 +0100)]
Fix Coverity ID 465
(This used to be commit 8629a0e1c3da7c2d2b0c1d99224177c54bbae930)

16 years agoAdd winbind_msg_dump_domain_list to winbindd.
Günther Deschner [Thu, 24 Jan 2008 15:19:58 +0000 (16:19 +0100)]
Add winbind_msg_dump_domain_list to winbindd.

Guenther
(This used to be commit 54ad97bd8364c393de2c9471a4c14ca5b880b318)

16 years agoAdd winbindd debugging ndr_print helpers.
Günther Deschner [Thu, 24 Jan 2008 15:10:18 +0000 (16:10 +0100)]
Add winbindd debugging ndr_print helpers.

Guenther
(This used to be commit 4389e4dadbf07c176d9102b74c06e62ecfc242be)

16 years agoAdd dump-domain-list command for debugging winbindd's domain_list.
Günther Deschner [Thu, 24 Jan 2008 15:09:20 +0000 (16:09 +0100)]
Add dump-domain-list command for debugging winbindd's domain_list.

Guenther
(This used to be commit 10fa43f2840899c0854763e55b9174827c522a5b)

16 years agorerun 'make idl'
Stefan Metzmacher [Thu, 24 Jan 2008 14:12:00 +0000 (15:12 +0100)]
rerun 'make idl'

metze
(This used to be commit 37b95450518419e2153e9930b63f894b68096d3d)

16 years agonetlogon.idl: add some MSV1_0_ values from samba3 and use a bitmap32
Stefan Metzmacher [Thu, 24 Jan 2008 14:17:06 +0000 (15:17 +0100)]
netlogon.idl: add some MSV1_0_ values from samba3 and use a bitmap32

metze
(cherry picked from commit 7222edb9cde5cdeb9d065e890775a7254b26648f)
(This used to be commit 503082e15e03def33434d3e5ff4fbe750873aab0)

16 years agoRe-run make idl and use generated ndr based on samba4 security.idl (except for DOM_SID).
Günther Deschner [Thu, 24 Jan 2008 12:53:36 +0000 (13:53 +0100)]
Re-run make idl and use generated ndr based on samba4 security.idl (except for DOM_SID).

Guenther
(This used to be commit 1781a57b18f681f1bc03873330147a813f10eba2)

16 years agoMerge over security.idl from samba4.
Günther Deschner [Thu, 24 Jan 2008 12:45:38 +0000 (13:45 +0100)]
Merge over security.idl from samba4.

Guenther
(This used to be commit 57f2b8d0a8d8987a62419e9852ac9a9cf39c3109)

16 years agoFix samr_EnumDomainUsers in samba3, must not be a ref pointer here.
Günther Deschner [Thu, 24 Jan 2008 10:44:29 +0000 (11:44 +0100)]
Fix samr_EnumDomainUsers in samba3, must not be a ref pointer here.

Guenther
(This used to be commit 3b87c5ce4f74f8dd01bfdf8859c6c832da15cd24)

16 years agonetlogon.idl: make use of bitmap samr_GroupAttrs
Stefan Metzmacher [Thu, 24 Jan 2008 09:24:41 +0000 (10:24 +0100)]
netlogon.idl: make use of bitmap samr_GroupAttrs

metze

(from v4-0-test 6d68161e676d381600c77c3f862bd7e013968724)
(This used to be commit 9b5f69cb1f7d22174b2cd67ebf02a271d4bf6e2f)

16 years agonetlogon.idl: remove unused netr_GroupsMembership structure
Stefan Metzmacher [Thu, 24 Jan 2008 09:22:45 +0000 (10:22 +0100)]
netlogon.idl: remove unused netr_GroupsMembership structure

We have samr_RidWithAttribute and use that in all cases.

metze
(cherry picked from commit 3c5bae2249d01213ff4bd7df2b4e3ac04da4a52d)
(This used to be commit 6ed640fadea6355dd6808db156228e6876d9f064)

16 years agoMore read_data -> read_socket_with_timeout
Volker Lendecke [Wed, 23 Jan 2008 16:37:59 +0000 (17:37 +0100)]
More read_data -> read_socket_with_timeout
(This used to be commit f1d7de462cf0f64648a3a1fc6f0c64a7bbdb3c2a)

16 years agoMerge branch 'setxattr-dos-mode' into v3-2-test
Derrell Lipman [Thu, 24 Jan 2008 01:50:24 +0000 (20:50 -0500)]
Merge branch 'setxattr-dos-mode' into v3-2-test
(This used to be commit 4c08725a42a8babf0f078fb4b221a96f58deeb50)

16 years agoAllow clearing all settable DOS mode bits. A mode value of zero is ignored by
Derrell Lipman [Thu, 24 Jan 2008 01:44:54 +0000 (20:44 -0500)]
Allow clearing all settable DOS mode bits.  A mode value of zero is ignored by
Windows.  If the requested mode is zero, we instead send the appropriate one
of 0x80 (NORMAL) or 0x10 (DIRECTORY).

Thanks Jeremy!

Derrell
(This used to be commit 54abf7d0e595e9cbeea115a40d4f7b995252a150)

16 years agoDon't leak memory in error path.
Jeremy Allison [Wed, 23 Jan 2008 23:23:16 +0000 (15:23 -0800)]
Don't leak memory in error path.
Jeremy.
(This used to be commit 2df0cdaafdced798f81e30d34371aa1d8e963208)

16 years agoUse strchr_m in seaching for '.' in the hostname to make sure we're mb safe.
Jeremy Allison [Wed, 23 Jan 2008 23:00:40 +0000 (15:00 -0800)]
Use strchr_m in seaching for '.' in the hostname to make sure we're mb safe.
Jeremy.
(This used to be commit 090061b73a1c086ff8a7797e1a63532eacd91148)

16 years agoFix Windows 2008 (Longhorn) join.
Andreas Schneider [Thu, 17 Jan 2008 10:35:40 +0000 (11:35 +0100)]
Fix Windows 2008 (Longhorn) join.

During 'net ads join' the cli->desthost is a hostname (e.g.
rupert.galaxy.site). Check if we have a hostname and use only the
first part, the machine name, of the string.
(This used to be commit 5f60ed4af680ba2811db8d9f8267348ce05f26d2)

16 years agoWindows 2008 (Longhorn) auth2 flag fixes.
Andreas Schneider [Thu, 17 Jan 2008 09:11:11 +0000 (10:11 +0100)]
Windows 2008 (Longhorn) auth2 flag fixes.

Interop fixes for AD specific flags. Original patch from Todd Stetcher.
(This used to be commit 5aadfcdaacd6f136eab9e107a88b8544e6d2105f)

16 years agoForward ported version of Matt Geddes <musicalcarrion@gmail.com>
Jeremy Allison [Wed, 23 Jan 2008 21:54:02 +0000 (13:54 -0800)]
Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user().
Jerry please test.
Jeremy.
(This used to be commit 7d94f97947b7edfcf3ec52f0125e4593d6d54c05)

16 years agoread_socket_with_timeout has timeout=0 handling
Volker Lendecke [Wed, 23 Jan 2008 15:42:31 +0000 (16:42 +0100)]
read_socket_with_timeout has timeout=0 handling
(This used to be commit 7101026061c470ed962267b43ac0aa67cc761a64)

16 years agostrtok -> strtok_r
Volker Lendecke [Wed, 23 Jan 2008 10:04:10 +0000 (11:04 +0100)]
strtok -> strtok_r
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)

16 years agoFix panic: Don't free the logfilename in winbind_child_died().
Michael Adam [Wed, 23 Jan 2008 13:33:22 +0000 (14:33 +0100)]
Fix panic: Don't free the logfilename in winbind_child_died().

The child struct is immediately reused, and this results
in a panic when child->logfilename == NULL.

Michael
(This used to be commit da131d089db98017632103aa9bbe38c98f7a3fc1)

16 years agoInitialize _domain_list to NULL.
Michael Adam [Wed, 23 Jan 2008 12:52:42 +0000 (13:52 +0100)]
Initialize _domain_list to NULL.

Just to be sure the "if (!_domain_list)" in domain_list() test always works.

Michael
(This used to be commit 1f49065d44dd7570d5a9928359751bd36f287952)

16 years agoFix get_trust_creds() to return always an upper-cased krb5 principal (this
Günther Deschner [Wed, 23 Jan 2008 11:03:51 +0000 (12:03 +0100)]
Fix get_trust_creds() to return always an upper-cased krb5 principal (this
fixes winbind krb5 session at least with heimdal).

Guenther
(This used to be commit 9cf3a98eacea2dd07f89245f147e002b3f49482e)

16 years agoRemove two unused variables
Volker Lendecke [Wed, 23 Jan 2008 09:33:36 +0000 (10:33 +0100)]
Remove two unused variables
(This used to be commit f12ac1ecedd6634d8ccc54d8fce8382514e3322f)

16 years agoFix tab_depth: it should not create an extra debug header.
Michael Adam [Tue, 22 Jan 2008 23:30:28 +0000 (00:30 +0100)]
Fix tab_depth: it should not create an extra debug header.

In pstring removal 4ae4b23586, the behaviour of tab_depth was
changed to create an extra debug header (by using the DEBUGLVL
macro).

This extracts the debug level check from DEBUGLVL into
a macro CHECK_DEBUGLVL without the debug header creation
and uses this instead of DEBUGLVL in tab_depth.

Michael
(This used to be commit cbc7d921fa696e6c3c5197ad9f87442ba679df82)

16 years agoMerge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
Andrew Tridgell [Wed, 23 Jan 2008 02:08:14 +0000 (13:08 +1100)]
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit bc2973df8504850a40cb0a1172689dc0bdafa323)

16 years agoAdded PFIF notice to Samba 3.2 tree
Andrew Tridgell [Wed, 23 Jan 2008 02:07:33 +0000 (13:07 +1100)]
Added PFIF notice to Samba 3.2 tree
(This used to be commit afccc9703c45815f94dd05805a060d71b7fe618a)

16 years agoGet Samba version or capability information from Windows
Corinna Vinschen [Tue, 22 Jan 2008 15:38:00 +0000 (16:38 +0100)]
Get Samba version or capability information from Windows

On Jan 22 13:31, Volker Lendecke wrote:
> On Tue, Jan 22, 2008 at 11:33:17AM +0100, Corinna Vinschen wrote:
> > Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
> > samba_version_string to 28 bytes.  New patch below.
>
> Ok, pushed with some modifications. You might want to review
> that.

Reviewed and tested.  Looks good, thank you!

Below you'll find a tiny patch to add the git commit date.  It seems
I simply missed its existence in version.h :(  Tested on Windows XP.

Thanks,
Corinna

* source/smbd/trans2.c (samba_extended_info_version): Fill out
samba_gitcommitdate member with GIT commit timestamp.
(This used to be commit a33d0797585b5cdd304ac1eb6966b9c7c799bab6)

16 years agoreplace svn references with git ones in Readme
Volker Lendecke [Tue, 22 Jan 2008 12:42:44 +0000 (13:42 +0100)]
replace svn references with git ones in Readme
(This used to be commit e6c92b62a4791fd5b530e6e52e4386e837bd7994)

16 years agoMove samba_extended_info_version to smbd/trans2.c
Volker Lendecke [Tue, 22 Jan 2008 12:00:22 +0000 (13:00 +0100)]
Move samba_extended_info_version to smbd/trans2.c

This is right now only used there, and in version.c it gave linker errors
because some binaries (e.g. smbmnt) don't link in time.o
(This used to be commit 1f0eaaa5911f893c822465a26fe49ab65afb0730)

16 years agoAvoid use of uninitialized memory
Volker Lendecke [Tue, 22 Jan 2008 11:46:51 +0000 (12:46 +0100)]
Avoid use of uninitialized memory
(This used to be commit 85123aacdb13e97c3f44aeded1c80e13af53d83d)

16 years agoGet Samba version or capability information from Windows
Corinna Vinschen [Tue, 22 Jan 2008 10:33:17 +0000 (11:33 +0100)]
Get Samba version or capability information from Windows

On Jan 21 16:18, Danilo Almeida wrote:
> Corina wrote:
>
> > + time_t samba_gitcommitdate;
>
> And:
>
> > +   SIVAL(pdata,28,extended_info.samba_gitcommitdate);
> > +   memcpy(pdata+32,extended_info.samba_version_string,32);
>
> Note that you are dropping bits on a system w/64-bit time_t, and that this has the 2038 problem.

Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
samba_version_string to 28 bytes.  New patch below.

Thanks,
Corinna
(This used to be commit 28aa1c199d3a22cda34afcaab49c0561eeb0abcb)

16 years agoHide streams from the EA API
Volker Lendecke [Mon, 21 Jan 2008 19:24:23 +0000 (20:24 +0100)]
Hide streams from the EA API
(This used to be commit e9bb3d5067b74a29beb778f85687829778e42b5b)

16 years agolibreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t
Stefan Metzmacher [Tue, 22 Jan 2008 11:21:55 +0000 (12:21 +0100)]
libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t

metze
(This used to be commit 2f460915111066d79f5dc9b4ae4d003918d06852)

16 years agoFix a ton of IBM checker uninitialized variable warnings
Volker Lendecke [Tue, 22 Jan 2008 08:22:14 +0000 (09:22 +0100)]
Fix a ton of IBM checker uninitialized variable warnings

SET_STAT_INVALID only sets nlink, not the other fields

We might consider to change SET_STAT_INVALID to always do ZERO_STRUCT
(This used to be commit 8cf8c5b2034fe093b5db7f069bc6be8d328399bf)

16 years agoFix get_ea_names_from_file for many EAs
Volker Lendecke [Tue, 22 Jan 2008 08:18:40 +0000 (09:18 +0100)]
Fix get_ea_names_from_file for many EAs

Found by the IBM checker
(This used to be commit 8741a9b37496e78b28d59d844aaba12f269171e0)

16 years agoFix a segfault
Volker Lendecke [Tue, 22 Jan 2008 08:13:25 +0000 (09:13 +0100)]
Fix a segfault

Found by the IBM checker.

Jeremy, you changed this from 'dirname == 0' which does not make sense at all
in the old code to '!dirname == 0' which from my point of view makes even less
sense, because the precedence of ! is according to Harbison/Steele higher than
the precedence of ==. Please check that the code now actually does what it's
supposed to do.

Thanks!
(This used to be commit c8def5564739c4c754001f84fcfb77f1093b96c3)

16 years agoAdd another check for talloc failure to libnet_conf
Michael Adam [Mon, 21 Jan 2008 14:35:09 +0000 (15:35 +0100)]
Add another check for talloc failure to libnet_conf

Michael
(This used to be commit 196e4ce8c5dd5aab518aaa7d170eb1fb5d66bcd1)

16 years agoFix formatting of multi_sz registry values.
Michael Adam [Mon, 21 Jan 2008 14:31:57 +0000 (15:31 +0100)]
Fix formatting of multi_sz registry values.

Don't print only the last component.

Michael
(This used to be commit 654e96208ec847e32797cbd2442ef9e73c014567)

16 years agoUse talloc_stackframe() for temporary contexts throughout libnet_conf.c
Michael Adam [Mon, 21 Jan 2008 14:28:04 +0000 (15:28 +0100)]
Use talloc_stackframe() for temporary contexts throughout libnet_conf.c

Michael
(This used to be commit 4d734106b70b9b6029b537fe11f8b3c1aebd42cf)

16 years agoAdd a check for talloc failure. - Pointed out by Volker.
Michael Adam [Mon, 21 Jan 2008 14:24:23 +0000 (15:24 +0100)]
Add a check for talloc failure. - Pointed out by Volker.

Michael
(This used to be commit bdc49b07cc6de36c9319254a131858c9a7f9dd53)

16 years agoFix two debug messages.
Michael Adam [Mon, 21 Jan 2008 14:14:16 +0000 (15:14 +0100)]
Fix two debug messages.

Michael
(This used to be commit 35e23368dd4240a3c907b4cee882f51119032527)

16 years agoAttempt to fix the darwin build
Volker Lendecke [Mon, 21 Jan 2008 17:07:38 +0000 (18:07 +0100)]
Attempt to fix the darwin build
(This used to be commit 5b05e09daf18eaea5e86dfd607c8070228f7571b)

16 years agoutil_sock: Don't return a pointer to freed memory.
Kai Blin [Mon, 21 Jan 2008 17:01:55 +0000 (18:01 +0100)]
util_sock: Don't return a pointer to freed memory.

Fix a bug in my bugfix. Thanks to vl for spotting that one.
(This used to be commit 24f68b90cca111256a7b03f7062cb57c2b08a0d6)

16 years agoAdd SMB_VFS_FS_CAPABILITIES
Volker Lendecke [Mon, 21 Jan 2008 14:10:44 +0000 (15:10 +0100)]
Add SMB_VFS_FS_CAPABILITIES

It turns out that this is a necessary operation, separate from statvfs. statvfs
can fail during tcon, so conn->fs_capabilities would never see that we support
streams on a particular share.

James, can you check that I got the darwin variant right? Thanks!
(This used to be commit 3ad798d803b3b023533bb48e6993885f22b96095)

16 years agoLink smbd on AIX with -bexpfull instead of -bexpall
Volker Lendecke [Mon, 21 Jan 2008 14:00:34 +0000 (15:00 +0100)]
Link smbd on AIX with -bexpfull instead of -bexpall

-bexpall only exports the names without leading _, so we don't get
_talloc_reallo_array for example.

Thanks a lot to Heinrich Mislik for the hint!
(This used to be commit 74a71f198866ba0a0217e58a6a47bdc858d5df68)

16 years agoutil_sock: Fix memcache bug in get_mydnsfullname.
Kai Blin [Mon, 21 Jan 2008 12:18:38 +0000 (13:18 +0100)]
util_sock: Fix memcache bug in get_mydnsfullname.

get_mydnsfullname relied on memcache_add(); memcache_lookup() working.
When run from ntlm_auth, the global_cache variable in memcache is NULL, so
the add and lookup both fail. In that case, just return the result of the
getaddrinfo call.

Jeremy, please check.
(This used to be commit 1db41ff52565e9f336a22fb9ffd80d51677e023b)

16 years agolibwbclient: use the same style in each switch case for the error mapping
Stefan Metzmacher [Sat, 19 Jan 2008 10:08:49 +0000 (11:08 +0100)]
libwbclient: use the same style in each switch case for the error mapping

metze
(This used to be commit 0b85f7173d0770f8d9a0bac9e43355eb45bc181f)

16 years agowinbindd: remove useless strcpy
Stefan Metzmacher [Fri, 18 Jan 2008 07:39:47 +0000 (08:39 +0100)]
winbindd: remove useless strcpy

metze
(This used to be commit df08708fc1e8fc8e15b36db29faf35ae5ae64b65)

16 years agoRename lib/util_reg_smbconf.c to registry/reg_init_smbconf.c
Michael Adam [Sun, 20 Jan 2008 23:40:10 +0000 (00:40 +0100)]
Rename lib/util_reg_smbconf.c to registry/reg_init_smbconf.c

This actually is a counterpart to reg_init_full, in that is does
open and initialize the registry too, but only registeres the backends
necessary to access the SMBCONF key.

Michael
(This used to be commit 01bda3ab359fb3868c1dc849044f613bf2bc563e)

16 years agoMove reg_frontend_hilvl.c to reg_dispatcher.c
Michael Adam [Sun, 20 Jan 2008 23:34:06 +0000 (00:34 +0100)]
Move reg_frontend_hilvl.c to reg_dispatcher.c

This is actually the dispatcher to the registered registry backends.

Michael
(This used to be commit 39d65d11f8eff0aff998d5bfed8480b0f00655bd)

16 years agoExtend/fix comments.
Michael Adam [Sun, 20 Jan 2008 23:32:01 +0000 (00:32 +0100)]
Extend/fix comments.

Michael
(This used to be commit 4952417fca89f5d797c861cde9fe74050ae02e2f)

16 years agoExtract regkey_open_internal() from reg_frontend.c to new reg_util_legacy.c
Michael Adam [Sun, 20 Jan 2008 23:28:39 +0000 (00:28 +0100)]
Extract regkey_open_internal() from reg_frontend.c to new reg_util_legacy.c

reg_openpath should be used instead of this function (along with the
reg_api interface). Last callers of this function are in services_db.c

Michael
(This used to be commit 0005b88d74fca1ea1410c9911d504b0a636a0472)

16 years agoRename reg_db.c to reg_backend_db.c
Michael Adam [Sun, 20 Jan 2008 23:16:40 +0000 (00:16 +0100)]
Rename reg_db.c to reg_backend_db.c

Michael
(This used to be commit c3f695d3b14ee06fc5d517ca094236e885f9e707)

16 years agoRename reg_shares.c to reg_backend_shares.c
Michael Adam [Sun, 20 Jan 2008 23:14:10 +0000 (00:14 +0100)]
Rename reg_shares.c to reg_backend_shares.c

Michael
(This used to be commit aaf33ae5b8bfaefd2342c9ce6363577ce7c0c4f1)

16 years agoRename reg_smbconf.c to reg_backend_smbconf.c
Michael Adam [Sun, 20 Jan 2008 23:07:41 +0000 (00:07 +0100)]
Rename reg_smbconf.c to reg_backend_smbconf.c

Michael
(This used to be commit b85e5ee45075211dd3ab85ac79c2d856187d5e3e)

16 years agoRename reg_printing.c to reg_backend_printing.c
Michael Adam [Sun, 20 Jan 2008 22:59:06 +0000 (23:59 +0100)]
Rename reg_printing.c to reg_backend_printing.c

Start making naming of source files more systematic
to facilitate understanding of the structures.

Michael
(This used to be commit b3c2fb17a4226559788a47fee968ef19b7fbb6b2)

16 years agoMakefile.in: Group together registry related object variables.
Michael Adam [Sun, 20 Jan 2008 22:48:28 +0000 (23:48 +0100)]
Makefile.in: Group together registry related object variables.

Michael
(This used to be commit cf485273f61e3dcd41ab7af756cc82f32131bf08)

16 years agoMakefile.in: extract registry backend objects to common variable.
Michael Adam [Sun, 20 Jan 2008 22:39:16 +0000 (23:39 +0100)]
Makefile.in: extract registry backend objects to common variable.

Michael
(This used to be commit 562c3eb37e2ff2b385203be9d556daf37df7d20e)

16 years agoreg_eventlog.o and reg_perfcount.o are no longer neede for reg_smbconf.
Michael Adam [Sun, 20 Jan 2008 22:44:33 +0000 (23:44 +0100)]
reg_eventlog.o and reg_perfcount.o are no longer neede for reg_smbconf.

This is an effect of the removal of the dynamic registry overlay.
This is the beginning of a restructuring of registry linkage in Makefile.in.

Michael
(This used to be commit 7453e78a8e63aaaff57c1779d6b7cf0ec8fc263f)