1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-21 12:23:50 +03:00
Commit Graph

83 Commits

Author SHA1 Message Date
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jeremy Allison
232fc5d69d r23147: Patch #4566 from jacob berkman <jberkman@novell.com>. Pass password data to krb5_prompter.
Jeremy.
2007-10-10 12:22:48 -05:00
Günther Deschner
0f436eab5b r22666: Expand kerberos_kinit_password_ext() to return NTSTATUS codes and make
winbindd's kerberized pam_auth use that.

Guenther
2007-10-10 12:19:54 -05:00
Günther Deschner
dcd902f24a r22664: When we have krb5_get_init_creds_opt_get_error() then try to get the NTSTATUS
codes directly out of the krb5_error edata.

Guenther
2007-10-10 12:19:53 -05:00
Günther Deschner
997ded4e3f r22663: Restructure kerberos_kinit_password_ext() error path.
Guenther
2007-10-10 12:19:53 -05:00
James Peach
4f6c2826aa r21779: I missd a call to krb5_get_init_creds_opt_alloc in r21778. 2007-10-10 12:18:32 -05:00
James Peach
c29c69d2df r21778: Wrap calls to krb5_get_init_creds_opt_free to handle the different
calling convention in the latest MIT changes.  Apparantly Heimdal
is also changing to this calling convention.
2007-10-10 12:18:32 -05:00
Günther Deschner
7e1a84b722 r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
2007-10-10 12:17:50 -05:00
Günther Deschner
4df582fa10 r21238: Fix tab indent in self-written krb5.confs.
Guenther
2007-10-10 12:17:50 -05:00
Günther Deschner
ea38e1f836 r21110: Fix kinit with Heimdal (Bug #4226).
Guenther
2007-10-10 12:17:38 -05:00
Günther Deschner
a9baf27e13 r20860: Adding some small tweaks. When we have no sitename, there is no need to
ask for the list of DCs twice.

Guenther
2007-10-10 12:17:14 -05:00
Jeremy Allison
97e248f89a r20857: Silence gives assent :-). Checking in the fix for
site support in a network where many DC's are down.
I heard via Volker there is still a bug w.r.t the
wrong site being chosen with trusted domains but
we'll have to layer that fix on top of this.
Gd - complain if this doesn't work for you.
Jeremy.
2007-10-10 12:17:14 -05:00
Günther Deschner
398f368c8a r18512: Add krb5conf file environment to debug statement.
Guenther
2007-10-10 11:51:45 -05:00
Jeremy Allison
dfd93a3031 r18241: If replacing the krb5.conf, ensure it's readable.
Jeremy.
2007-10-10 11:51:18 -05:00
Jeremy Allison
0a89b37b1a r18226: Ensure we only do this evil thing if it's our realm.
Jeremy.
2007-10-10 11:51:16 -05:00
Jeremy Allison
c82aac594f r18225: If we're going to overwrite krb5.conf, at least
be polite enough to make a backup.
Jeremy.
2007-10-10 11:51:16 -05:00
Jeremy Allison
38b8a2b527 r18201: Make explicit what's going on here.
Jeremy.
2007-10-10 11:51:16 -05:00
Jeremy Allison
88e11ee91a r18200: Experimental code to allow system /etc/krb5.conf to be
overwritten by winbindd. Don't enable this :-).
Jeremy.
2007-10-10 11:51:16 -05:00
Jeremy Allison
10b32cb6de r18010: Ensure we don't timeout twice to the same
server in winbindd when it's down and listed
in the -ve connection cache. Fix memory leak,
reduce timeout for cldap calls - minimum 3 secs.
Jeremy.
2007-10-10 11:39:48 -05:00
Jeremy Allison
77fe2a3d74 r18006: Actually a smaller change than it looks. Leverage
the get_dc_list code to get the _kerberos. names
for site support. This way we don't depend on one
KDC to do ticket refresh. Even though we know it's
up when we add it, it may go down when we're trying
to refresh.
Jeremy.
2007-10-10 11:39:47 -05:00
Jeremy Allison
ecca467e46 r18004: If you're writing out a krb5.conf, at least
get the syntax right... :-).
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
515f86167b r18003: Creating a directory and getting EEXIST isn't an error.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
5f84c8c815 r18002: Improved debug.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
ba311ac4ea r18001: Proper error reporting on write/close fail.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
f1c5409b9f r18000: Get nelem/size args right for x_fwrite.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
99f100cfec r17999: No need to prevent others from reading. Use 755 instead
of 700, and 644 instead of 600. Reading might help
debugging.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
c59eff3e53 r17997: Ensure lockdir exists for winbindd. Store tmp
krb5.conf files under lockdir, not privatedir.
Jeremy.
2007-10-10 11:39:46 -05:00
Jeremy Allison
188eb9794d r17996: Don't talloc free the memory then reference it. Doh !
Jeremy.
2007-10-10 11:39:45 -05:00
Jeremy Allison
541594153b r17995: Ensure we create the domain-specific krb5 files in a
separate directory.
Jeremy.
2007-10-10 11:39:45 -05:00
Jeremy Allison
7acbcf9a6c r17994: Add debugs that showed me why my site code wasn't
working right. Don't update the server site when we
have a client one...
Jeremy.
2007-10-10 11:39:45 -05:00
Jeremy Allison
638d53e2ad r17946: Fix couple of typos...
Jeremy.
2007-10-10 11:39:01 -05:00
Jeremy Allison
9be4ecf24b r17945: Store the server and client sitenames in the ADS
struct so we can see when they match - only create
the ugly krb5 hack when they do.
Jeremy.
2007-10-10 11:39:01 -05:00
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