1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

21040 Commits

Author SHA1 Message Date
Jeremy Allison
0b33d60aff Cope with valgrind > 3.2.x.
Jeremy.
(This used to be commit e799eb8da6f5e7a2173ba6b8fb040430fd1c6f34)
2007-12-15 23:05:30 -08:00
Jeremy Allison
d76b086cc9 More work on bug #5082, use LC_ALL as this takes
precedence.
Jeremy.
(This used to be commit 446ebae76d6796b30e4c71ff7190337c28637be6)
2007-12-15 22:28:38 -08:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba77697346a365589101aac379febecd546)
2007-12-15 22:47:30 +01:00
Volker Lendecke
79cd97cc3f Use dom_sid_string for sid_string_talloc
Remove some code duplication, but introduce one more dependency on librpc/ndr.
Easily turned around so that librpc/ndr depends on lib/util_sid if necessary
(This used to be commit 3a0b1b2060facd5f1ac1461b23dd86c75cdd9458)
2007-12-15 22:33:52 +01:00
Volker Lendecke
4312ad8b98 sid_string_static is no more :-)
We now have four ways to do sid_to_string:

sid_to_string: Convert it into an existing fstring, when you have one

sid_string_talloc: The obvious thing

sid_string_tos: For the lazy, use only with care

sid_string_dbg: The one to use in DEBUG statements
(This used to be commit 7b8276aaa48852270c6b70b081c3f28e316a7a2c)
2007-12-15 22:09:37 +01:00
Volker Lendecke
14ef4cdec1 Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is
still far better than a static one.
(This used to be commit c7c885078be8fd3024c186044ac28275d7609679)
2007-12-15 22:09:37 +01:00
Volker Lendecke
d899b8c56a Use sid_to_string directly
It seems a bit pointless to do a fstrcpy(dst, sid_string_static(src))
(This used to be commit c221c246b10e2dbbd54a9af2dc45de2eae237380)
2007-12-15 22:09:36 +01:00
Volker Lendecke
7b01537679 Replace sid_string_static with sid_string_tos
In utils/ I was a bit lazy...
(This used to be commit 60e830b0f4571bd5d9039f2edd199534f2a4c341)
2007-12-15 22:09:36 +01:00
Volker Lendecke
54ae9dfcbc Use sid_string_talloc where we have a tmp talloc ctx
(This used to be commit 0a911d38b8f4be382a9df60f9c6de0c500464b3a)
2007-12-15 22:09:36 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
2007-12-15 22:09:36 +01:00
Volker Lendecke
f498f661bc Add sid_string_dbg
This makes use of the just added debug_ctx and will kill many
sid_string_static() calls
(This used to be commit 3e4148c280efe154c3f8d552731c8b29d6977507)
2007-12-15 22:09:35 +01:00
Volker Lendecke
db98b92144 Add debug_ctx according to an idea by Tridge
Sorry, Jeremy, I think for debug messages this is just the right way to do it.
(This used to be commit 6312016e2727c2b5b1a4964a98cfb9585d77cc8c)
2007-12-15 22:09:35 +01:00
Volker Lendecke
105635e23c Use sid_string_talloc where we have a tmp talloc ctx
(This used to be commit f00ab810d2540679bec109498ac89e1eafe18f03)
2007-12-15 22:09:35 +01:00
Volker Lendecke
2cb7f5f632 add sid_string_talloc
(This used to be commit 9e3ef0923d71cc06b8445be2625ebd8dfed1b42d)
2007-12-15 22:09:35 +01:00
Volker Lendecke
43473c8ded Fix a segfault
sid_to_string still expects a fstring
(This used to be commit 1f352cdd1976ad36484e146165df585b88ec5527)
2007-12-15 09:13:56 -08:00
Jeremy Allison
3cdd8da3ca Fix for bug #5082 from Mathias Gug <mathiaz@ubuntu.com>, Steve Langasek <vorlon@debian.org>.
Recent versions of Linux-PAM support localization of user prompts,
so Samba must use the C locale when invoking PAM (directly or via
/usr/bin/passwd) to ensure that password chat values match the prompts in a
locale-invariant fashion.
Jeremy.
(This used to be commit bc13e939546a5bcb78925a6b117e89fde20f6451)
2007-12-14 17:02:50 -08:00
Stefan Metzmacher
9f2490c251 selftest: reenable wbinfo tests and pass --configfile instead of -s
metze
(This used to be commit 56251f78524416435299e26fca405e77d0f42043)
2007-12-14 19:39:49 +01:00
Stefan Metzmacher
ffe42b9015 wbinfo: use POPT_COMMON_CONFIGFILE
We can't use POPT_COMMON_SAMBA as the -s option is
already used by -s, --sid-to-name=SID.

Also load the config file after processing the cmdline options

metze
(This used to be commit 33cbd6903e8b468a782fb5d6913eb82824d3b347)
2007-12-14 19:38:23 +01:00
Stefan Metzmacher
16352dd60b add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze
(This used to be commit af3392cc20942158ac9e0a533799c5904ff23347)
2007-12-14 19:36:14 +01:00
Stefan Metzmacher
4130053a57 selftest: disable wbinfo tests
wbinfo needs to take --config-file to work...

metze
(This used to be commit a8a74fc88cb6f4be1efdc1afab9b91defcd015ae)
2007-12-14 18:02:05 +01:00
Stefan Metzmacher
28c7c831ed selftest: add a bunch of wbinfo based tests for winbindd
metze
(This used to be commit 88b6d2c0e83f515e2f83e5b4edc0728c434c7294)
2007-12-14 16:56:10 +01:00
Stefan Metzmacher
9bcfb5af7d selftest: move workgroup name into WORKGROUP envvar
metze
(This used to be commit 8ace8fa82c2ccd6fdb9ca076fb2d6fed203c8126)
2007-12-14 16:19:18 +01:00
Karolin Seeger
6a364ce330 Revert smbclient changes.
Patch broke option -p.
Sorry for breaking the build!

Karolin
(This used to be commit 81dab4145ffaf21d5d2176b16b5989f4035dd791)
2007-12-14 12:08:30 +01:00
Karolin Seeger
4d7a337d52 Make smbclient to display error message and usage in the case of invalid options.
(This used to be commit 04131b26de08b3cea948ef89921c56561d69dd1d)
2007-12-14 11:20:27 +01:00
Stefan Metzmacher
873f14ae40 winbindd: move domain child specific stuff into its own file
metze
(This used to be commit 075d315e0f72d506b70040da10940e4af131b4e2)
2007-12-14 08:28:35 +01:00
Stefan Metzmacher
adc31b9235 Revert "Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames."
As it breaks all tests which try to join a new machine account.
So more testing is needed...

metze

This reverts commit dd320c0924ce393a89b1cab020fd5cffc5b80380.
(This used to be commit cccb80b7b7980fbe1298ce266375e51bacb4a425)
2007-12-14 08:28:10 +01:00
Stefan Metzmacher
1410c9e37d debug: fix crash bug when DEBUG() is used before setup_logging()
this was introduced by the pstring removal
(1ea3ac80146b83c2522b69e7747c823366a2b47d)

metze
(This used to be commit a412e6c7c676a054acd9db371221a50078cfe1d9)
2007-12-14 08:22:14 +01:00
James Peach
40889dccdf Move dns_sd.h include to fix the build.
(This used to be commit cf221a94bd8794add508a2b9305b8c0d40c3346a)
2007-12-13 22:12:21 -08:00
James Peach
7b457645fb Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 0de2b3eb515f2da21ffd1ce54979bb1f8063024b)
2007-12-13 20:56:53 -08:00
Rishi Srivatsavai
12ac4c3119 Register the smb service with mDNS if mSDN is supported.
If mDNS is supported, attempt to register the first port we are
listening on for the _smb._tcp service. This provides more reliable
service discovery than NetBIOS browsing.
(This used to be commit 1e7241517d1f55d60af22570e0c9feb280e3fdb5)
2007-12-13 20:56:29 -08:00
Jeremy Allison
138333ed1f We don't need to call endpwent if we never call getpwent.
Jeremy.
(This used to be commit 27078d1292e8588956ae78e4cddb1bcebbe84478)
2007-12-13 17:25:26 -08:00
Jeremy Allison
03ccaab05f Add a varient of Steve Langasek <vorlon@debian.org> patch
for bug #4780. Cause user mounts to inherit uid= and gid= from the
calling user when called as non-root, except when overridden on the
commandline.
Jeremy.
(This used to be commit 7fad5f38ea86ef76dc8e0853926b3248230616be)
2007-12-13 17:18:48 -08:00
Jeremy Allison
54e32ba846 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit c9496e97cf91c5f29f19c123377f03f44d1a32f6)
2007-12-13 16:46:42 -08:00
Jeremy Allison
9e733924d9 Arg. The fix for CVE-2007-6015 hadn't been merged into 3.2.
Do so now....
Jeremy.
(This used to be commit 6b1246c29a0241c8e4bb98d659d847d010826b36)
2007-12-13 16:44:24 -08:00
Michael Adam
0d8146d5de Fix typo in debug statement.
Michael
(This used to be commit da23684261f40c06dea30ab2df0c878ebb0d0d81)
2007-12-13 14:38:05 +01:00
Alexander Bokovoy
733425f312 Fix codepagedir to follow predefined libdir when using FHS. Fixes x86_64 build.
(This used to be commit b8e582c9941d2466a403e476c52026f4b4201062)
2007-12-13 14:23:04 +03:00
Alexander Bokovoy
e25383400a Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 45636efa39cbcc2ecf7af4dfd1ac6a90f197ba01)
2007-12-13 12:57:24 +03:00
Alexander Bokovoy
ceedf1a111 Fix pam_smbpass build
(This used to be commit fbc510f1717fe82338262c18c252d18987c55b5c)
2007-12-13 12:55:32 +03:00
Michael Adam
5db4a7f6c4 Add flags for correctly implementing lsa_lookup_name levels.
(Prepare fix for Bug #4801.)

Michael
(This used to be commit 537b12647e25adcb7da3581f18d2e9feca1caf0c)
2007-12-13 10:15:21 +01:00
Michael Adam
9104d2bf79 Make cm_connect_sam() try harder to connect autheticated.
Even if the session setup was anonymous, try and collect
trust creds with get_trust_creds() and use these before
falling back to schannel.

This is the first attempt to fix interdomain trusts.
(get password policy and stuff)

Michael
(This used to be commit e180bbd45452435e981192028a0ad90078c04236)
2007-12-13 10:15:20 +01:00
Michael Adam
13e0e4bdf2 Refactor out assembling of trust creds (pw, account name, principal).
Michael
(This used to be commit 481f18b20d6d5ee12c62120a3559bb16cc98e465)
2007-12-13 10:15:20 +01:00
Michael Adam
a493c7baac Streamline and fix logic of cm_prepare_connection().
Do not attempt to do a session setup when in a trusted domain
situation (this gives STATUS_NOLOGON_TRUSTED_DOMAIN_ACCOUNT).

Use get_trust_pw_clear to get machine trust account.
Only call this when the results is really used.
Use the proper domain and account name for session setup.

Michael
(This used to be commit 18c66a364e0ddc4960769871ca190944f7fe5c44)
2007-12-13 10:15:20 +01:00
Michael Adam
7cf5c17f12 Refactoring out get_schannel_session_key logic.
Refactor the actual retrieval of the session key through the
established netlogon pipe out of get_schannel_session_key()
and get_schannel_session_key_auth_ntlmssp() into a new
function get_schannel_session_key_common().
(To avoid code duplication.)

Michael
(This used to be commit e77c4022cfbb868e608edcb06b676658b0e201ad)
2007-12-13 10:15:19 +01:00
Michael Adam
ce76bcff29 Pass NULL instead of unneeded &sid: pdb_get_trusteddom_pw() checks.
Michael
(This used to be commit b2e12365b56f24586a7dfcb845f4de51f0b0e7d5)
2007-12-13 10:15:19 +01:00
Michael Adam
31f221ed93 Rename get_trust_pw() to get_trust_pw_hash().
Michael
(This used to be commit 0cde7ac9cb39a0026a38ccf66dbecefc12931074)
2007-12-13 10:15:19 +01:00
Michael Adam
1084151442 Export logic of get_trust_pw() to new function get_trust_pw_clear().
get_trust_pw() just now computes the md4 hash of the result of
get_trust_pw_clear() if that was successful. As a last resort,
in the non-trusted-domain-situation, get_trust_pw() now tries to
directly obtain the hashed version of the password out of secrets.tdb.

Michael
(This used to be commit 4562342eb84e6fdcec15d8b7ae83aa146aabe2b7)
2007-12-13 10:15:18 +01:00
Michael Adam
fe969f9a7f Refactor the lagacy part of secrets_fetch_trust_account_password() out
into a new function secrets_fetch_trust_account_password_legacy() that
does only try to obtain the hashed version of the machine password directly
from secrets.tdb.

Michael
(This used to be commit 91da12b751b3168dc40049f3e90c10d840393efc)
2007-12-13 10:15:18 +01:00
Michael Adam
f793c99ca5 Let get_trust_pw() determine the machine_account_name to use.
Up to now each caller used its own logic.

This eliminates code paths where there was a special treatment
of the following situation: the domain given is not our workgroup
(i.e. our own domain) and we are not a DC (i.e. it is not a typical
trusted domain situation). In situation the given domain name was
previously used as the machine account name, resulting in an account
name of DOMAIN\\DOMAIN$, which does not seem very reasonable to me.
get_trust_pw would not have obtained a password in this situation
anyways.

I hope I have not missed an important point here!

Michael
(This used to be commit 6ced4a7f88798dc449a667d63bc29bf6c569291f)
2007-12-13 10:15:17 +01:00
Michael Adam
5d9c977034 Streamline logic in cm_connect_netlogon()
by retrieving trust password only, when it will be used.

Michael
(This used to be commit cdc60d8ae8c0ef804206b20b451e9557f97d4439)
2007-12-13 10:15:16 +01:00
Michael Adam
4884f5d23a In cm_prepare_connection(), only get auth user creds if we need to.
Michael
(This used to be commit 164bfb25d7b5cfeffeb4d81958b7629a11ca5d5e)
2007-12-13 10:15:14 +01:00