1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

100 Commits

Author SHA1 Message Date
Jeremy Allison
408267a2d7 r17944: Handle locking madness.
Jeremy.
2007-10-10 11:39:01 -05:00
Jeremy Allison
d500e1f96d r17943: The horror, the horror. Add KDC site support by
writing out a custom krb5.conf file containing
the KDC I need. This may suck.... Needs some
testing :-).
Jeremy.
2007-10-10 11:39:01 -05:00
Volker Lendecke
21c8fa2fc8 r17345: Some C++ warnings 2007-10-10 11:38:26 -05:00
Jeremy Allison
144067783d r17003: Fix coverity #303 - possible null deref. Jerry please
check this is your new code.
Jeremy.
2007-10-10 11:19:17 -05:00
Gerald Carter
baf554c793 r16957: fix cut-n-paste error. The check for 'if (\!salt)' make no sense when fetching the DES salting principal 2007-10-10 11:19:15 -05:00
Volker Lendecke
bf701f5129 r16955: Fix an uninitialized var -- Jerry, please check. 2007-10-10 11:19:15 -05:00
Gerald Carter
6261dd3c67 r16952: New derive DES salt code and Krb5 keytab generation
Major points of interest:

* Figure the DES salt based on the domain functional level
  and UPN (if present and applicable)
* Only deal with the DES-CBC-MD5, DES-CBC-CRC, and RC4-HMAC
  keys
* Remove all the case permutations in the keytab entry
  generation (to be partially re-added only if necessary).
* Generate keytab entries based on the existing SPN values
  in AD

The resulting keytab looks like:

ktutil:  list -e
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    6 host/suse10.plainjoe.org@COLOR.PLAINJOE.ORG (DES cbc mode with CRC-32)
   2    6 host/suse10.plainjoe.org@COLOR.PLAINJOE.ORG (DES cbc mode with RSA-MD5)
   3    6 host/suse10.plainjoe.org@COLOR.PLAINJOE.ORG (ArcFour with HMAC/md5)
   4    6           host/suse10@COLOR.PLAINJOE.ORG (DES cbc mode with CRC-32)
   5    6           host/suse10@COLOR.PLAINJOE.ORG (DES cbc mode with RSA-MD5)
   6    6           host/suse10@COLOR.PLAINJOE.ORG (ArcFour with HMAC/md5)
   7    6               suse10$@COLOR.PLAINJOE.ORG (DES cbc mode with CRC-32)
   8    6               suse10$@COLOR.PLAINJOE.ORG (DES cbc mode with RSA-MD5)
   9    6               suse10$@COLOR.PLAINJOE.ORG (ArcFour with HMAC/md5)

The list entries are the two basic SPN values (host/NetBIOSName & host/dNSHostName)
and the sAMAccountName value.  The UPN will be added as well if the machine has
one. This fixes 'kinit -k'.

Tested keytab using mod_auth_krb and MIT's telnet.  ads_verify_ticket()
continues to work with RC4-HMAC and DES keys.
2007-10-10 11:19:15 -05:00
Günther Deschner
afdb118902 r16272: Fix memleak.
Guenther
2007-10-10 11:17:30 -05:00
Günther Deschner
8b2ba11508 r15240: Correctly disallow unauthorized access when logging on with the
kerberized pam_winbind and workstation restrictions are in effect.

The krb5 AS-REQ needs to add the host netbios-name in the address-list.

We don't get the clear NT_STATUS_INVALID_WORKSTATION code back yet from
the edata of the KRB_ERROR but the login at least fails when the local
machine is not in the workstation list on the DC.

Guenther
2007-10-10 11:16:29 -05:00
Jeremy Allison
37ab42afbc r15210: Add wrapper functions smb_krb5_parse_name, smb_krb5_unparse_name,
smb_krb5_parse_name_norealm_conv that pull/push from unix charset
to utf8 (which krb5 uses on the wire). This should fix issues when
the unix charset is not compatible with or set to utf8.
Jeremy.
2007-10-10 11:16:28 -05:00
Günther Deschner
bde4a4018e r14611: Fix init_creds_opts issue jerry discovered when using MIT krb5 1.3:
We were using a far too short renewable_time in the request; newer MIT
releases take care interally that the renewable time is never shorter
then the default ticket lifetime.

Guenther
2007-10-10 11:15:39 -05:00
Günther Deschner
afc519530f r14585: Tighten argument list of kerberos_kinit_password again,
kerberos_kinit_password_ext provides access to more options.

Guenther
2007-10-10 11:15:38 -05:00
Gerald Carter
635f0c9c01 r14512: Guenther, This code breaks winbind with MIT krb1.3.
I'm disabling it for now until we have en effective
means of dealing with the ticket request flags for users
and computers.
2007-10-10 11:15:35 -05:00
Günther Deschner
7b1fcb75da r14503: Fix principal in debug statement.
Guenther
2007-10-10 11:15:34 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Gerald Carter
aaed605206 r11651: After talking to Jeremy, commit my winbindd "Do the Right Thing" patch.
Still needs some more testing ni domains with multiple DCs. Coming next....
2007-10-10 11:05:22 -05:00
Volker Lendecke
d92c83aa42 r11551: Add a few more initialize_krb5_error_table 2007-10-10 11:05:20 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Gerald Carter
a0ac9a8ffd r7415: * big change -- volker's new async winbindd from trunk 2007-10-10 10:57:08 -05:00
Herb Lewis
173375f8d8 r6586: get rid of a few more compiler warnings 2007-10-10 10:56:46 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Derrell Lipman
5b19ede88e r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.

Temporarily defined -Wall to locate other potential problems.  Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).

There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.

oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.

The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
2007-10-10 10:56:24 -05:00
Gerald Carter
4b351f2fcc r4736: small set of merges from rtunk to minimize the diffs 2007-10-10 10:53:52 -05:00
Jeremy Allison
c3f9c81a8f r4334: Fix for bugid #2186 - from Buck Huppmann <buckh@pobox.com>
to prevent uninitialized creds being freed.
Jeremy.
2007-10-10 10:53:44 -05:00
Günther Deschner
c7eab285d9 r3495: Fix the build (recent kerberos-changes).
Guenther
2007-10-10 10:53:07 -05:00
Jeremy Allison
b356a8fdc5 r3492: Fixes from testing kerberos salted principal fix.
Jeremy.
2007-10-10 10:53:07 -05:00
Günther Deschner
05619cfdbf r3439: Finally fix build for platforms without kerberos.
Guenther
2007-10-10 10:53:07 -05:00
Jeremy Allison
30b8807cf6 r3379: More merging of kerberos keytab and salting fixes from Nalin Dahyabhai <nalin@redhat.com>
(bugid #1717).
Jeremy.
2007-10-10 10:53:05 -05:00
Jeremy Allison
7565019286 r3377: Merge in first part of modified patch from Nalin Dahyabhai <nalin@redhat.com>
for bug #1717.The rest of the code needed to call this patch has not yet been
checked in (that's my next task). This has not yet been tested - I'll do this
once the rest of the patch is integrated.
Jeremy.
2007-10-10 10:53:05 -05:00
Günther Deschner
86a61c86a4 r1967: Fix a couple of krb5-DEBUG-messages.
Guenther
2007-10-10 10:52:25 -05:00
Jeremy Allison
d4abeefe3e r1245: I think the parameter for "password" and "data" was reversed.
CHECK THIS !
Jeremy.
2007-10-10 10:52:02 -05:00
Gerald Carter
be74e88d9a r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers 2007-10-10 10:51:28 -05:00
Jim McDonough
c2436c433a Fix bugzilla # 1208
Winbind tickets expired.  We now check the expiration time, and acquire
new tickets.  We couln't rely on renewing them, because if we didn't get
a request before they expired, we wouldn't have renewed them.  Also, there
is a one-week limit in MS on renewal life, so new tickets would have been
needed after a week anyway.   Default is 10 hours, so we should only be
acquiring them that often, unless the configuration on the DC is changed (and
the minimum is 1 hour).
-
Jeremy Allison
eadfd312ba Merge tridge's blank password fix from HEAD.
Jeremy.
-
Andrew Bartlett
83973c3893 Updates from Samba HEAD:
- Fix segfaults in the 'net ads' commands when no password is provided
 - Readd --with-ldapsam for 2.2 compatability.  This conditionally compiles the
   old options, but the actual code is available on all ldap systems.
 - Fix shadow passwords (as per work with vl)
 - Fix sending plaintext passwords to unicode servers (again vl)
 - Add a bit of const to secrets.c functions
 - Fix some spelling and grammer by vance.
 - Document the -r option in smbgroupedit.

There are more changes in HEAD, I'm only merging the changes I've been involved
with.

Andrew Bartlett
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
3928578b52 sync 3.0 branch with head -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Andrew Tridgell
412e79c448 net ads password and net ads chostpass commands from Remus Koos -
Andrew Tridgell
ed6279481b better error handling -
Andrew Tridgell
cb9dbcef7c allow overriding the local time in kerberos_kinit_password() -
Andrew Tridgell
be254eb13c moved ccache location change into winbindd code -
Andrew Tridgell
f7ead035eb fixed used of string after free -
Andrew Tridgell
435fdf276a added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm -
Andrew Tridgell
3de552f365 put the winbindd krb5 credentials cache in the lock directory
this prevents it clobbering the users cache
-
Andrew Tridgell
3ace8f1fcc added a propoer kerberos_kinit_password call
contribution from remus@snapserver.com

thanks!
-
Andrew Tridgell
7d94f1b736 added a REALLY gross hack into kerberos_kinit_password so that
winbindd can do a kinit
this will be removed once we have code that gets a tgt
and puts it in a place where cyrus-sasl can see it
-
Andrew Bartlett
8f9ce71781 Make better use of the ads_init() function to get the kerberos relam etc.
This allows us to use automagically obtained values in future, and the value
from krb5.conf now.

Also fix mem leaks etc.

Andrew Bartlett
-
Andrew Tridgell
058a5aee90 added "net join" command
this completes the first stage of the smbd ADS support
-