1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

514 Commits

Author SHA1 Message Date
Gerald Carter
af52df2f1f r7020: fixing printer ace values and getting rid of false compiler warning about unitialized variable
(This used to be commit 3a91b20e4b)
2007-10-10 10:57:00 -05:00
Volker Lendecke
2e0cac8e3e r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?

Volker
(This used to be commit 61d40ac60d)
2007-10-10 10:56:41 -05:00
Volker Lendecke
83e11ba86c r6263: Get rid of generate_wellknown_sids, they are const static and initializable
statically.

Volker
(This used to be commit 3493d9f383)
2007-10-10 10:56:33 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71)
2007-10-10 10:56:30 -05:00
Jeremy Allison
a5f84481e3 r5655: Added support for Novell NDS universal password. Code donated by
Vince Brimhall <vbrimhall@novell.com> - slight tidyup by me to
use Samba conventions.
Vince - thanks a *lot* for this code - please test to make sure
I haven't messed anything up.
Jeremy.
(This used to be commit 6f5ea963ab)
2007-10-10 10:55:54 -05:00
Volker Lendecke
140752fd35 r5647: Caches are good for performance, but you get a consistency problem.
Fix bug # 2401.

Volker
(This used to be commit eb4ef94f24)
2007-10-10 10:55:53 -05:00
Gerald Carter
c7a00987e3 r5562: * bump version to 3.0.12pre2
* change special character in gd's valid workstation
  check to a '+' to be more in line with the characters
  used by valid users
(This used to be commit 8bff048650)
2007-10-10 10:55:47 -05:00
Günther Deschner
051d9d7894 r5528: Expand the invalid-workstation-scheme. Workstation-Names with leading
'@'-sign are expanded on-the-fly as posix-groups of workstations. This
allows optional, more flexible login-control in larger networks.

Guenther
(This used to be commit 8f143b6800)
2007-10-10 10:55:45 -05:00
Gerald Carter
732f09990f r5431: couple of cimpile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2341 & 2342
(This used to be commit 0edcfc7fa2)
2007-10-10 10:55:40 -05:00
Gerald Carter
467da937c7 r5385: when operating in security = domain, allow domain admins to manage rigths assignments
(This used to be commit fec9cb7daa)
2007-10-10 10:55:39 -05:00
Volker Lendecke
aa9132cc55 r5331: Support SIDs as %s replacements in the afs username map parameter.
Add 'log nt token command' parameter. If set, %s is replaced with the user
sid, and %t takes all the group sids.

Volker
(This used to be commit e7dc9fde45)
2007-10-10 10:55:37 -05:00
Günther Deschner
5f54cc9bd3 r5264: Log with loglevel 0 when account-administration scripts fail.
Guenther
(This used to be commit 3d391ef149)
2007-10-10 10:55:35 -05:00
Günther Deschner
9b1e5a7118 r4972: Fix a warning and some debugging-outputs.
Guenther
(This used to be commit 1eabfa050b)
2007-10-10 10:55:10 -05:00
Gerald Carter
46e5effea9 r4805: Last planned change to the privileges infrastructure:
* rewrote the tdb layout of privilege records in account_pol.tdb
  (allow for 128 bits instead of 32 bit flags)
* migrated to using SE_PRIV structure instead of the PRIVILEGE_SET
  structure.  The latter is now used for parsing routines mainly.

Still need to incorporate some client support into 'net' so
for setting privileges.  And make use of the SeAddUserPrivilege
right.
(This used to be commit 41dc7f7573)
2007-10-10 10:53:55 -05:00
Gerald Carter
d94d87472c r4724: Add support for Windows privileges in Samba 3.0
(based on Simo's code in trunk).  Rewritten with the
following changes:

* privilege set is based on a 32-bit mask instead of strings
  (plans are to extend this to a 64 or 128-bit mask before
   the next 3.0.11preX release).
* Remove the privilege code from the passdb API
  (replication to come later)
* Only support the minimum amount of privileges that make
  sense.
* Rewrite the domain join checks to use the SeMachineAccountPrivilege
  instead of the 'is a member of "Domain Admins"?' check that started
  all this.

Still todo:

* Utilize the SePrintOperatorPrivilege in addition to the 'printer admin'
  parameter
* Utilize the SeAddUserPrivilege for adding users and groups
* Fix some of the hard coded _lsa_*() calls
* Start work on enough of SAM replication to get privileges from one
  Samba DC to another.
* Come up with some management tool for manipultaing privileges
  instead of user manager since it is buggy when run on a 2k client
  (haven't tried xp).  Works ok on NT4.
(This used to be commit 77c10ff9aa)
2007-10-10 10:53:51 -05:00
Gerald Carter
be606e8eeb r4579: small changes to allow the members og the Domain Admins group on the Samba DC to join clients to the domain -- needs more testing and security review but does work with initial testing
(This used to be commit 9ade9bf49c)
2007-10-10 10:53:48 -05:00
Günther Deschner
992ad28485 r4286: Give back 8 byte lm_session_key in Netrsamlogon-reply.
The old #ifdef JRATEST-block was copying 16 bytes and thus overwriting
acct_flags with bizarre values, breaking a lot of things.

This patch is successfully running in a production environment for quite
some time now and is required to finally allow Exchange 5.5 to access
another Exchange Server when both are running on NT4 in a
samba-controlled domain. This also allows Exchange Replication to take
place, Exchange Administrator to access other Servers in the network,
etc. Fixes Bugzilla #1136.

Thanks abartlet for helping me with that one.

Guenther
(This used to be commit bd4c5125d6)
2007-10-10 10:53:41 -05:00
Jeremy Allison
54fdd5c7dc r4236: More *alloc fixes.
Jeremy.
(This used to be commit 6b25a6e088)
2007-10-10 10:53:39 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Volker Lendecke
f9e87b9ba6 r3705: Nobody has commented, so I'll take this as an ack...
abartlet, I'd like to ask you to take a severe look at this!

We have solved the problem to find the global groups a user is in twice: Once
in auth_util.c and another time for the corresponding samr call. The attached
patch unifies these and sends them through the passdb backend (new function
pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further
optimize the corresponding call if the samba and posix accounts are unified by
issuing a specialized ldap query.

The parameter to activate this ldapsam behaviour is

ldapsam:trusted = yes

Volker
(This used to be commit b94838aff1)
2007-10-10 10:53:15 -05:00
Andrew Bartlett
d5a03878ef r3616: Merge for 3.0.8.
In auth_winbind, remove the push_utf8 calls, as this is no longer a
UTF8 interface.  (Removed from everywhere else earlier).

Tested with ASCII - I tried to load the weird charset for testing, but
it doesn't seem to work any more.

Andrew Bartlett
(This used to be commit cb27c197ee)
2007-10-10 10:53:10 -05:00
Volker Lendecke
55fe875a44 r3563: During a typical logon a modern workstation makes a lot of anonymous session
setups on its way to open a pipe. This gets rid of many round-trips to the
LDAP server during logon by setting up the server_info_guest once and not
asking the LDAP server and nss every time. Make sure that the ldap connection
is reopened in the child. (I did not look at the sql backends.)

Volker
(This used to be commit 3298f6105e)
2007-10-10 10:53:09 -05:00
Gerald Carter
841868d290 r3140: * try to ensure consistent usage of the username map.
Use the fully qualified DOMAIN\user format for 'security = domain|ads'
  and apply after authentication has succeeded.

* also change fill_domain_username() to only lowercase the username
  and not the domain+username.  This was a cosmetic fix only.
  makes the output more consistent with %D and %U.
(This used to be commit 30ee2d5b09)
2007-10-10 10:53:02 -05:00
Tim Potter
8f49721fef r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.
Bugzilla #1903.
(This used to be commit 1327d83d90)
2007-10-10 10:52:56 -05:00
Jeremy Allison
521268be1c r2703: Fix typo noticed by Igor Belyi <sambauser@katehok.ac93.org>
Jeremy.
(This used to be commit ba69c7229c)
2007-10-10 10:52:49 -05:00
Gerald Carter
ed5fd7117e r2086: fix bug with winbindd_getpwnam() caused by Microsoft DC's not filling in the username in the user_info3
(This used to be commit 4703a71fa8)
2007-10-10 10:52:31 -05:00
Jeremy Allison
efeeb48740 r1780: Remove the UTC comment as it isn't.
Jeremy.
(This used to be commit f454821ff5)
2007-10-10 10:52:20 -05:00
Jeremy Allison
a8dca8b4b6 r1778: Fix based on code from Richard Renard <rrenard@idealx.com> to
enforce logon hours. ldap fixes to follow.
Jeremy.
(This used to be commit 9ce273ed66)
2007-10-10 10:52:20 -05:00
Andrew Bartlett
9d0783bf21 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
(This used to be commit 36741d3cf5)
2007-10-10 10:52:13 -05:00
Jeremy Allison
cd87b3b972 r1414: Memory leak fixes found by valgrind whilst checking the password history code.
Error code paths were not freeing up some memory.
Jeremy.
(This used to be commit 7c4666e56c)
2007-10-10 10:52:11 -05:00
Gerald Carter
600e904aa1 r1370: BUG 1297 - prevent map_username() from being called twice during logon
(This used to be commit e1364ff774)
2007-10-10 10:52:08 -05:00
Volker Lendecke
5be2af4822 r1175: Nowadays we actually do have local groups, so add the corresponding SIDs to
the NT token we build.

Thanks to Guenther Deschner <gd@sernet.de>.

Volker
(This used to be commit 2f9143dee9)
2007-10-10 10:51:58 -05:00
Gerald Carter
9dbf2e2419 r991: Allow winbindd to use the domain trust account password
for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
(This used to be commit e9f109d1b3)
2007-10-10 10:51:53 -05:00
Jeremy Allison
8c0db1bbc4 r786: Memory leak fixes in (mostly) error code paths from
kawasa_r@itg.hitachi.co.jp. A couple of mem leak fixes in
mainline code paths though :-).
Jeremy.
(This used to be commit 4695cc95fe)
2007-10-10 10:51:38 -05:00
Andrew Bartlett
50ac33f582 r86: This function was moved to lib/nterr.h
Andrew Bartlett
(This used to be commit 1c6d0399d6)
2007-10-10 10:51:08 -05:00
Andrew Bartlett
d17425ed52 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
(This used to be commit 724e8d3f33)
2007-10-10 10:51:06 -05:00
Andrew Bartlett
c2ff214772 Fix most of bug #169.
For a (very) long time, we have had a bug in Samba were an NTLMv2-only
PDC would fail, because it converted the password into NTLM format for
checking.

This patch performs the direct comparison required for interactive
logons to function in this situation.  It also removes the 'auth flags', which
simply where not ever used.

Natrually, this plays with the size of structures, so rebuild, rebuild
rebuild...

Andrew Bartlett
(This used to be commit 9598593bcf)
2004-04-03 15:41:32 +00:00
Gerald Carter
c340b2e5e4 fix overlapping memory bug when copying username
(This used to be commit a7cac639c2)
2004-03-16 20:28:47 +00:00
Gerald Carter
d24b8a2032 BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes
(This used to be commit f2eaa14b1e)
2004-03-16 16:41:54 +00:00
Jim McDonough
ee5dd175e5 Add calls to password lockout functions. Should now work against tdbsam only.
(This used to be commit 3e8a9c3584)
2004-02-21 17:41:28 +00:00
Volker Lendecke
590b60045d Remove bogus check. No functional change, just cosmetics.
Volker
(This used to be commit e3a5e2d9c2)
2004-02-02 07:53:56 +00:00
Gerald Carter
919c261a49 BUG 936: fix bind credentials for schannel binds in smbd (and add a comment to winbindd_cm about this
(This used to be commit 5134c6bcbc)
2004-01-15 06:55:10 +00:00
Rafal Szczesniak
22457718b6 Doxygen comment fix.
rafal
(This used to be commit b5e492b8ea)
2004-01-07 22:43:36 +00:00
Andrew Bartlett
a7f8c26d24 Change our Domain controller lookup routines to more carefully seperate
DNS names (realms) from NetBIOS domain names.

Until now, we would experience delays as we broadcast lookups for DNS names
onto the local network segments.

Now if DNS comes back negative, we fall straight back to looking up the
short name.

Andrew Bartlett
(This used to be commit 32397c8b01)
2004-01-05 04:10:28 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Andrew Bartlett
adc07646a3 Move our basic password checking code from inside the authentication
subsystem into a seperate file - ntlm_check.c.

This allows us to call these routines from ntlm_auth.  The purpose of this
exercise is to allow ntlm_auth (when operating as an NTLMSSP server) to
avoid talking to winbind.  This should allow for easier debugging.

ntlm_auth itself has been reorgainised, so as to share more code between
the SPNEGO-wrapped and 'raw' NTLMSSP modes.  A new 'client' NTLMSSP mode
has been added, for use with a Cyrus-SASL module I am writing (based on vl's
work)

Andrew Bartlett
(This used to be commit 48315e8fd2)
2003-12-30 07:33:58 +00:00
Andrew Bartlett
bccf3f374b Refactor our authentication and authentication testing code.
The next move will be to remove our password checking code from the SAM
authentication backend, and into a file where other parts of samba can use
it.

The ntlm_auth changes provide for better use of common code.

Andrew Bartlett
(This used to be commit 2375abfa00)
2003-12-30 05:02:32 +00:00
Gerald Carter
682f20c9ca * add a few useful debug lines
* fix bug involving Win9x clients.  Make sure we
  save the right case for the located username
  in fill_sam_account()
(This used to be commit 850e4be29e)
2003-12-19 00:33:09 +00:00
Jeremy Allison
8d019a9682 Final part of fix for #445. Don't add user for machine accounts.
Jeremy.
(This used to be commit 3684cffbd2)
2003-12-09 18:34:29 +00:00
Jeremy Allison
aad0b08cbb Fix for bug #445 (missing unix user on kerberos auth doesn't call add user
script).
Jeremy.
(This used to be commit 5d9f06bdae)
2003-12-06 02:34:02 +00:00
Andrew Bartlett
6268505496 Patch by emil@disksites.com <Emil Rasamat> to ensure we always always
free() each auth method. (We had relied on the use of talloc() only, despite providing the free() callback)

Andrew Bartlett
(This used to be commit 5872c0e26e)
2003-11-23 00:16:54 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0d)
2003-11-22 13:19:38 +00:00
Jeremy Allison
33e6af5b3d Patch from Andrew Bartlett <abartlet@samba.org> for security=server core
dump if server goes away.
Jeremy.
(This used to be commit e61324cc6a)
2003-11-10 19:33:42 +00:00
Volker Lendecke
39ccc0f515 Skip over the winbind separator when looking up a user.
Volker
(This used to be commit 6b457d0c5c)
2003-11-09 17:23:57 +00:00
Gerald Carter
b922425cac run krb5 logins through the username map if the winbindd lookup fails; bug 698
(This used to be commit efe257bce2)
2003-11-06 17:28:44 +00:00
Jeremy Allison
ab8f9387b7 Andrew Bartlett patch to cope with Exchange 5.5 cleartext pop password auth.
Jeremy.
(This used to be commit 46e66ee950)
2003-10-24 01:18:56 +00:00
Jeremy Allison
bb0598faf5 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
(This used to be commit d7e35dfb92)
2003-10-22 23:38:20 +00:00
Gerald Carter
3fb80f1926 more 2.2.x compatibility fixes - allow user looksup in the kerb5
sesssetup to fall back to 'user' instaed of failing is REA.LM\user
doesn't exist.

also fix include line in smb_acls.h as requested by metze
(This used to be commit 62ed2598b3)
2003-10-20 16:49:45 +00:00
Gerald Carter
e7f41de758 make sure to call get_user_groups() with the full winbindd name for a user if he;she has one; bug 406
(This used to be commit 1737b36e91)
2003-10-07 16:34:23 +00:00
Jeremy Allison
07c90e499e Tidy up some formatting. Get ready for allowing bad password lockout. (based
on a patch posted from Richard Renard <rrenard@idealx.com>.
Jeremy.
(This used to be commit abf54b58e9)
2003-09-08 20:42:33 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Jeremy Allison
fcdebdae6f Fix bug found by tridge in 2.2.x. Ensure that %U substitution is
restored on next valid packet if a logon fails. This has relevence
if people are using su.exe within logon scripts !
Jeremy.
(This used to be commit d405a93a9d)
2003-08-28 23:57:34 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +00:00
Gerald Carter
c1bc3a7841 fix for BUG #267 (problem with supplementary groups).
Use winbindd to get the group list if possible since we already
know it from netsamlogon_cache.tdb. More effecient than letting
libc call getgrent() to get seconary groups.

Tested by Ken Cross.
(This used to be commit 3c537c906f)
2003-08-09 23:12:35 +00:00
Gerald Carter
56bb027696 need to be able to connect to a domain member as a local account; don't always map to the domain name
(This used to be commit 20b6e64da2)
2003-08-08 05:11:11 +00:00
Jeremy Allison
29ca70cd34 Add a command line option (-S on|off|required) to enable signing on client
connections. Overrides smb.conf parameter if set.
Jeremy.
(This used to be commit 879309671d)
2003-07-30 23:49:29 +00:00
Jeremy Allison
0c4358889e Correctly detect an "add user script" - check that *lp_adduser_script() != '\0',
not lp_adduser_script() != NULL.
Jeremy.
(This used to be commit 2eac65ebe7)
2003-07-26 01:21:06 +00:00
Tim Potter
7d833de662 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
(This used to be commit 59dae1da66)
2003-07-25 04:24:40 +00:00
Tim Potter
77373f1f8e More printf fixes - size_t is long on some architectures.
(This used to be commit ba4d334b82)
2003-07-24 23:46:27 +00:00
Jeremy Allison
79e2d7c24e Server side NTLM signing works - until the first async packet. Working on this
next....
Jeremy.
(This used to be commit eff74a1fcc)
2003-07-24 04:25:37 +00:00
Gerald Carter
3a5dc7c2ec convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
(This used to be commit 9f835b85dd)
2003-07-23 12:33:59 +00:00
Volker Lendecke
f4d4b079e9 Fix memleak
(This used to be commit 228fe54f0d)
2003-07-18 11:36:16 +00:00
Richard Sharpe
9b9f1697ee Fix a small typo in a comment and pretty it up a bit.
(This used to be commit 3b5ddd8e1f)
2003-07-11 17:50:59 +00:00
Gerald Carter
03d5867d52 moving more code around.
* move rid allocation into IDMAP.  See comments in _api_samr_create_user()
  * add winbind delete user/group functions

I'm checking this in to sync up with everyone.  But I'm going to split
the add a separate winbindd_allocate_rid() function for systems
that have an 'add user script' but need idmap to give them a RID.
Life would be so much simplier without 'enable rid algorithm'.
The current RID allocation is horrible due to this one fact.
Tested idmap_tdb but not idmap_ldap yet.  Will do that tomorrow.

Nothing has changed in the way a samba domain is represented, stored,
or search in the directory so things should be ok with previous installations.

going to bed now.
(This used to be commit 0463045cc7)
2003-07-11 05:33:40 +00:00
Gerald Carter
16ff7b26f6 Large set of changes to add UNIX account/group management
to winbindd.  See README.idmap-and-winbind-changes for details.
(This used to be commit 1111bc7b0c)
2003-07-09 16:44:47 +00:00
Gerald Carter
f637448150 standlone servers don't have any trusted domains
(This used to be commit 4acdfc5c94)
2003-07-08 17:19:37 +00:00
Gerald Carter
499b3e3315 fix bone head mistake when setting the uid in the server_info struct.
(This used to be commit 43f21078ec)
2003-07-08 17:04:11 +00:00
Tim Potter
0d0f89461e Initialise the uid and gid values to a safe default in make_server_info()
(This used to be commit 3a1f4f5ea5)
2003-07-08 05:37:13 +00:00
Gerald Carter
0c3d46f17f fix temporary bug so people can test 3.0 again; make sure to initialize the uid for the server_info struct
(This used to be commit 6a84297da5)
2003-07-08 02:19:16 +00:00
Tim Potter
e25785fbdc Spelling.
(This used to be commit a9a3339b2d)
2003-07-08 01:04:06 +00:00
Gerald Carter
5365869b68 temporarily disable a sanity check to prevent winbindd from deadlocking
on a Samba PDC.  Will be re-enabled after winbind_passdb is done.
(This used to be commit c4762aa3bc)
2003-07-07 05:28:51 +00:00
Gerald Carter
0b18acb841 and so it begins....
* remove idmap_XX_to_XX calls from smbd.  Move back to the
  the winbind_XXX and local_XXX calls used in 2.2

* all uid/gid allocation must involve winbindd now

* move flags field around in winbindd_request struct

* add WBFLAG_QUERY_ONLY option to winbindd_sid_to_[ug]id()
  to prevent automatic allocation for unknown SIDs

* add 'winbind trusted domains only' parameter to force a domain member
  server to use matching users names from /etc/passwd for its domain
  (needed for domain member of a Samba domain)

* rename 'idmap only' to 'enable rid algorithm' for better clarity
  (defaults to "yes")

code has been tested on

  * domain member of native mode 2k domain
  * ads domain member of native mode 2k domain
  * domain member of NT4 domain
  * domain member of Samba domain
  * Samba PDC running winbindd with trusts

Logons tested using 2k clients and smbclient as domain users
and trusted users. Tested both 'winbind trusted domains only = [yes|no]'

This will be a long week of changes.  The next item on the list is
winbindd_passdb.c & machine trust accounts not in /etc/passwd (done
via winbindd_passdb)
(This used to be commit 8266dffab4)
2003-07-07 05:11:10 +00:00
Andrew Bartlett
b475d0b889 This changes our Unix primary GID behaviour back to what most people expect:
Samba will now use the user's UNIX primary group, as the primary group when
dealing with the filesystem.  The NT primary group is ignored in unix.

For the NT_TOKEN, the primary group is the NT priamry group, and the unix
primary group is added to the NT_TOKEN as a supplementary group.

This should fix bug #109, but will need to be revisited when we get a full
NT group database.

Also in this commit:
 - Fix debug statements in service.c
 - Make idmap_ldap show if it's adding, or modifying an existing DN
 - Make idmap_ldap show both the error message and error string
(This used to be commit 32e455a714)
2003-07-06 05:51:20 +00:00
Andrew Bartlett
85921dbd6f Add some debug statments to our vampire code - try to make it easier to track
down failures.

Add a 'auto-add on modify' feature to guestsam

Fix some segfault bugs on no-op idmap modifications, and on new idmappings that
do not have a DN to tack onto.

Make the 'private data' a bit more robust.

Andrew Bartlett
(This used to be commit 6c48309cda)
2003-07-05 10:39:41 +00:00
Andrew Bartlett
d809ad1d19 PAM should operate on the Unix username, not the NT username (which might not
have the domain\ qualification).

Andrew Bartlett
(This used to be commit 7cfa1e7c4a)
2003-07-05 08:05:06 +00:00
Jeremy Allison
9bcbaeee32 Fixed strlower changes I missed. Pointed out by metze.
Jeremy
(This used to be commit da5ee2b765)
2003-07-04 18:50:21 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Andrew Bartlett
61116049ca This patch takes the work the jerry did for beta2, and generalises it:
- The 'not implmented' checks are now done by all auth modules
 - the ntdomain/trustdomain/winbind modules are more presise as to
   what domain names they can and cannot handle
 - The become_root() calls are now around the winbind pipe opening only,
   not the entire auth call
 - The unix username is kept seperate from the NT username, removing the
   need for 'clean off the domain\' in parse_net.c
 - All sid->uid translations are now validated with getpwuid() to put a very
   basic stop to logins with 'half deleted' accounts.

Andrew Bartlett
(This used to be commit 85f88191b9)
2003-07-03 14:36:42 +00:00
Gerald Carter
814968d41b * fixed volker's wbinfo -a lockup again. This one was my fault.
It was caused by the winbind_ping() call in is_trusted_domain()

  o if we are a DC then we check our own direct trust relationships
    we have to rely on winbindd to update the truatdom_cache
  o if we are a domain member, then we can update the trustdom_cache
    ourselves if winbindd is not there
(This used to be commit 22dfcafb37)
2003-07-01 17:51:52 +00:00
Gerald Carter
fb5a006c09 fix typos in log messages and comments.
(This used to be commit fd24183ec3)
2003-07-01 05:45:16 +00:00
Gerald Carter
0362868fa7 * revert change to get_global_sam_name()
* add get_default_sam_name() to be used by make_user_info_map()
* add comments describing get_*_sam_name()
(This used to be commit 90470366ea)
2003-07-01 04:11:42 +00:00
Gerald Carter
db6ce132e3 * fix the trustdom_cache to work when winbindd is not running.
smbd will update the trustdom_cache periodically after locking
  the timestamp key
(This used to be commit 7bc4b65b91)
2003-07-01 03:49:41 +00:00
Gerald Carter
e359dbcedb * cleanup more DC name resolution issues in check_*domain_security()
* is_trusted_domain() is broken without winbind.  Still working on this.
* get_global_sam_name() should return the workgroup name unless we
  are a standalone server (verified by volker)
* Get_Pwnam() should always fall back to the username (minus domain name)
  even if it is not our workgroup so that TRUSTEDOMAIN\user can logon
  if 'user' exists in the local list of accounts (on domain members w/o
  winbind)

Tested using Samba PDC with trusts (running winbindd) and a Samba 3.0
domain member not running winbindd.

notes: make_user_info_map() is slightly broken now due to the
fact that is_trusted_domain() only works with winbindd.  disabled
checks temporarily until I can sort this out.
(This used to be commit e1d6094d06)
2003-06-30 20:45:14 +00:00
Jeremy Allison
a32ae05744 Valgrind found a bug (subtracting a pointer from a length rather than the
length of what the pointer points to).
Jeremy.
(This used to be commit 492a96e992)
2003-06-30 20:41:40 +00:00
Gerald Carter
f265935101 * rename samstrict auth method to sam
* rename original sam auth method to sam_ignoredomain
* remove samstrict_dc auth method (now covered by 'sam')
* fix wbinfo -a '...' and getent passwd bugs when running
  winbindd on a samba PDC (reported by Volker)
(This used to be commit 52166faee7)
2003-06-30 17:24:59 +00:00
Gerald Carter
b8723aaa65 Here's the code to make winbindd work on a Samba DC
to handle domain trusts.  Jeremy and I talked about this
and it's going in as working code.  It keeps winbind clean
and solves the trust problem with minimal changes.

To summarize, there are 2 basic cases where the deadlock would
occur.  (1) lookuping up secondary groups for a user, and
(2) get[gr|pw]nam() calls that fall through the NSS layer because
they don't exist anywhere.

o To handle case #1, we bypass winbindd in sys_getgrouplist() unless
  the username includes the 'winbind separator'.

o Case #2 is handled by adding checks in winbindd to return failure
  if we are a DC and the domain matches our own.

This code has been tested using basic share connections, domain
logons, and with pam_winbind (both with and without 'winbind
use default domain').  The 'trustdomain' auth module should work
as well if an admin wants to manually create UNIX users for
acounts in the trusted domains.

Other misc fixes:

  * we need to fix check_ntlm_password() to be able to determine
    if an auth module is authoritative over a user (NT_STATUS_WRONG_PASSWORD,
    etc...).  I worked around my specific situation, but this needs to be
    fixed.  the winbindd auth module was causing delays.
  * fix named server mutex deadlock between trust domain auth module
    and winbindd looking up a uid
  * make sure SAM_ACCOUNT gets stored in the server_info struct for the
    _net_sam_logon() reply.

Configuration details:

The recommended method for supporting trusts is to use winbind.
The gets us around some of the server mutex issues as well.

  * set 'files winbind' for passwd: and group: in /etc/nsswitch.conf
  * create domain trusts like normal
  * join winbind on the pdc to the Samba domain using 'net rpc join'
  * add normal parameters to smb.conf for winbind
  * set 'auth method = guest sam winbind'
  * start smbd, nmbd, & winbindd

Problems that remain:

  * join a Windows 2k/XP box to a Samba domain.
  * create a 2-way trust between the Samba domain
    and an NT domain
  * logon to the windows client as a user from theh trusted
    domain
  * try to browse server in the trusted domain (or other
    workstations).  an NT client seems to work ok, but 2k
    and XP either prompt for passwords or fail with errors.

apparanently this never got tested since no one has ever been
able to logon as a trusted user to a Samba domain from a Windows
client.
(This used to be commit f804b590f9)
2003-06-29 03:39:50 +00:00
Gerald Carter
8a6fc79ad8 add check for NT_STATUS_NOT_IMPLEMENTED in auth check so that
map to guest = bad user works again when "trustdomain" is listed
as last auth method.

Also clean up some more DC location calls.
(This used to be commit 77a5b1032f)
2003-06-28 08:29:42 +00:00
Gerald Carter
f51d769dd3 large change:
*)  consolidates the dc location routines again (dns
    and netbios)  get_dc_list() or get_sorted_dc_list()
    is the authoritative means of locating DC's again.

    (also inludes a flag to get_dc_list() to define
     if this should be a DNS only lookup or not)

    (however, if you set "name resolve order = hosts wins"
     you could still get DNS queries for domain name IFF
     ldap_domain2hostlist() fails.  The answer?  Fix your DNS
     setup)

*)  enabled DOMAIN<0x1c> lookups to be funneled through
    resolve_hosts resulting in a call to ldap_domain2hostlist()
    if lp_security() == SEC_ADS

*)  enables name cache for winbind ADS backend

*)  enable the negative connection cache for winbind
    ADS backend

*)  removes some old dead code

*)  consolidates some duplicate code

*)  moves the internal_name_resolve() to use an IP/port pair
    to deal with SRV RR dns replies.  The namecache code
    also supports the IP:port syntax now as well.

*)  removes 'ads server' and moves the functionality back
    into 'password server' (which can support "hostname:port"
    syntax now but works fine with defaults depending on
    the value of lp_security())
(This used to be commit d7f7fcda42)
2003-06-25 17:41:05 +00:00
Gerald Carter
f36c96d59c * s/get_dc_name/rpc_dc_name/g (revert a previous change)
* move back to qsort() for sorting IP address in get_dc_list()

* remove dc_name_cache in cm_get_dc_name() since it slowed
  things down more than it helped.  I've made a note of where
  to add in the negative connection cache in the ads code.
  Will come back to that.

* fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead
  of MAX_ALLOWED)

* only enumerate domain local groups in our domain

* simplify ldap search for seqnum in winbindd's rpc backend
(This used to be commit f8cab8635b)
2003-06-23 19:05:23 +00:00
Gerald Carter
7356d558ff fix typo (bug #170)
(This used to be commit d376b67de9)
2003-06-23 18:27:59 +00:00
Simo Sorce
f5974dfaae Found out a good number of NT_STATUS_IS_ERR used the wrong way.
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK

This patch will cure the problem.
Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is
used correctly, but I'm not 100% sure, coders should check the use of
NT_STATUS_IS_ERR() in samba is ok now.

Simo.
(This used to be commit c501e84d41)
2003-06-22 10:09:52 +00:00
Gerald Carter
93bcb9963b merge of the netsamlogon caching code from APPLIANCE_HEAD
This replaces the universal group caching code (was originally
based on that code).  Only applies to the the RPC code.

One comment: domain local groups don't show up in 'getent group'
that's easy to fix.

Code has been tested against 2k domain but doesn't change anything
with respect to NT4 domains.

netsamlogon caching works pretty much like the universal group
caching code did but has had much more testing and puts winbind
mostly back in sync between branches.
(This used to be commit aac01dc7bc)
2003-06-21 04:05:01 +00:00
Jeremy Allison
292a51eda1 Forward port the app-head changes for dc name cache into 3.0.
Jeremy.
(This used to be commit 8bcc3116a2)
2003-06-13 21:03:15 +00:00
Volker Lendecke
511789b855 Andrew's change to make 'security = domain' work again. Leave the user and group
that has been authenticated unmapped.

We need to make sure that every caller of idmap handles failure gracefully.

Volker
(This used to be commit 902d607b66)
2003-06-12 14:24:15 +00:00
Volker Lendecke
2cd38cd8e8 Fix some misleading debug messages.
(This used to be commit 9c003ae4ff)
2003-06-12 08:22:55 +00:00
Volker Lendecke
0d8307fac3 Andrew is right, this is probably the wrong approach.
Take away the automatic mapping of users and groups again.

Volker
(This used to be commit 74510369d4)
2003-06-12 07:21:26 +00:00
Volker Lendecke
a7e1bbbd06 Fix 'security = domain' without winbind. This stores the sid we got
from the PDC as a mapping to the uid we got from getpwnam in the
local idmap.

This should not be worse than the current state, so I decided to
commit it. It is different from abartlet's preliminary patch, but I
believe this is the better solution. Feel free to comment and/or
revert it.

Volker
(This used to be commit 0c16965e6f)
2003-06-11 16:36:04 +00:00
Jelmer Vernooij
cad20ab63b Add some static. Patch by Stefan Metzmacher <metze@metzemix.de>
(This used to be commit e1a8e9b7f3)
2003-06-04 16:40:50 +00:00
Gerald Carter
3a6d0a23cd volker's fix for crash when my_private_data == NULL
(This used to be commit 40127404e3)
2003-05-27 16:46:51 +00:00
Volker Lendecke
f527ca3d52 Correctly initialize winbind auth method.
(This used to be commit b9e7ce9d85)
2003-05-26 16:38:35 +00:00
Tim Potter
ac33cc9ca3 Spelling.
(This used to be commit eda8973068)
2003-05-26 06:53:25 +00:00
Andrew Bartlett
54e2ac64b7 Add samstrict_dc from metze (been sitting in HEAD for way to long waiting for
me to review it).

This patch works well for a DC running with trusted domains, becouse it lets
you check the local SAM first, but only for this domain's users.

Andrew Bartlett
(This used to be commit e0bd4d2844)
2003-05-26 02:04:23 +00:00
Andrew Bartlett
6ace723c44 Get 'add user script' working again for Samba 3.0.
I'm still not convinced that sharing the option name with the administrative
code is the best idea, but anyway...

Tested by vl, bug #41.

Andrew Bartlett
(This used to be commit 9d78f064c5)
2003-05-25 23:56:41 +00:00
Simo Sorce
9e9849c0ee add metze's patch for smb_register functions
(This used to be commit 1480c7e8c7)
2003-05-16 06:20:57 +00:00
Jelmer Vernooij
6203409d2e Patch from Luke Howard <lukeh@PADL.COM> that fixes some weird handling of
modules in auth/
(This used to be commit 4b6785a6c0)
2003-05-15 08:47:28 +00:00
Tim Potter
402fbc518a spelling
(This used to be commit 865c112756)
2003-05-14 00:46:43 +00:00
Simo Sorce
c823b191ab And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
(This used to be commit 0e58085978)
2003-05-12 18:12:31 +00:00
Volker Lendecke
fda311d527 When we have a NT4SP0 PDC trust us, we first have to check the
password. On NT4, NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT means
the password was correct. So the PDC believed that he had his trust
account correctly added. Later the auth2 naturally failed.

BTW, setting up an interdom trust account is not what I would call
well documented and easy to handle... Working on that now :-)

Volker
(This used to be commit e4e44cf3b1)
2003-05-11 13:20:27 +00:00
Andrew Bartlett
4f52bd500b Cleanups. My NTLMv2 changes also changed the preference from using an implicit
structure-memcpy for DATA_BLOB parameters to using a pointer to that DATA_BLOB.

auth_sam calls some of these functions, so I've cleaned it all up to use this
format now.

Also clean up some debug statements to make them easier to read.

Andrew Bartlett
(This used to be commit 0c355c274a)
2003-05-09 15:02:11 +00:00
Andrew Bartlett
5f5c4aaffd Make sure we always have some client data, not just the hash. An NTLMv2 or
LMv2 response less than 24 bytes is just silly.

Andrew Bartlett
(This used to be commit b4ecdb2e58)
2003-05-09 09:41:08 +00:00
Volker Lendecke
d1da999e0a This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more
roundtrips for the second PIPE open and bind. With this patch logging
in to a member server is a matter of two (three if you count the
ack...) packets between us and the DC.

Volker
(This used to be commit 5b3cb7725a)
2003-05-08 08:02:52 +00:00
Jelmer Vernooij
d2373e7dce Make the version numbers ints (patch from metze)
(This used to be commit dbe36b4c43)
2003-04-30 23:06:44 +00:00
Jelmer Vernooij
17a3acafa8 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
(This used to be commit bc4b51bcb2)
2003-04-28 17:48:48 +00:00
Andrew Bartlett
c07d7de389 Add cast for compiler
(This used to be commit 456eb5d05a)
2003-04-28 14:23:44 +00:00
Andrew Bartlett
59e0836b7f Merge auth changes from HEAD:
- better error codes than NT_STATUS_UNSUCCESSFUL for domain logon errors
 - make auth_winbind load the ntdomain module if winbind isn't there.
 - use new trusted domains cache to determine if the domain is valid.

Andrew Bartlett
(This used to be commit ec8d6524c6)
2003-04-24 11:56:09 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Jelmer Vernooij
a8c95d79f8 Add support for the new modules system to auth/ (merge from HEAD)
(This used to be commit c7a1de090d)
2003-04-16 12:13:07 +00:00
Jelmer Vernooij
11fb38cfb8 Fix typo
(This used to be commit 738a2b055a)
2003-04-14 21:19:18 +00:00
Andrew Bartlett
53beee9e56 (merge from HEAD)
NTLM Authentication:

- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
(This used to be commit ec071ca3dc)
2003-03-24 09:54:13 +00:00
Jelmer Vernooij
702e76dd3e Fix some comment typos
(This used to be commit 051b33e98f)
2003-03-19 15:24:17 +00:00
Andrew Bartlett
cdc6fc8acb Add an extra parameter to our 'set_remote_machine_name' and
'set_local_machine_name' so that the client can't change it from under us.

(.NET RC2 and WinXP install calls the machine 'machinename' during NTLMSSP
on the domain join).

Andrew Bartlett
(This used to be commit 4c7163e7c2)
2003-03-18 09:52:55 +00:00
Andrew Bartlett
395b8937ac Merge from HEAD - doxygen
(This used to be commit 7a2566f2e9)
2003-03-17 22:43:57 +00:00
Andrew Bartlett
45d3e78547 Mege from HEAD - doxygen.
(This used to be commit 04a5cbc896)
2003-03-17 22:42:56 +00:00
Andrew Bartlett
e72ecdc862 Merge of server-side authentication changes to 3.0:
- user_ok() and user_in_group() now take a list of groups, instead of
   looking for the user in the members of all groups.

 - The 'server_info' returned from the authentication is now kept around
  - in future we won't copy the sesion key, username etc, we will just
    referece them directly.

 - rhosts upgraded to use the SAM if possible, otherwise fake up based on
   getpwnam().

 - auth_util code to deal with groups upgraded to deal with non-winbind domain
   members again.

Andrew Bartlett
(This used to be commit 74b5436c75)
2003-02-24 02:35:54 +00:00
Andrew Bartlett
7f204e07ae Merge from HEAD - allow "" as a domain in the NLTMv2 hash calculations. Fixes
interop with clients not in our domain.

Andrew Bartlett
(This used to be commit 6aa3aba3db)
2003-02-16 22:23:33 +00:00
Jeremy Allison
8fc1f1aead Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
(This used to be commit a823fee5b4)
2003-02-14 22:55:46 +00:00
Andrew Bartlett
8a20407442 Cleanups: (merge from HEAD)
- use safe_strcpy() instead of pstrcpy() for malloc()ed strings

 - CUPS: a failure in an attempt to automaticly add a printer is not level 0 stuff.

 - Fix up a possible Realloc() failure segfault

Andrew Bartlett
(This used to be commit c1cfc296c2)
2003-02-10 11:47:21 +00:00
Andrew Bartlett
b694d0ff53 Merge HEAD: check both the account and password...
Andrew Bartlett
(This used to be commit 830de56bf2)
2003-02-04 10:08:45 +00:00
Andrew Bartlett
1cba0a7579 Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor.
  - also consequential changes to the NTLMSSP and SPNEGO parsing functions
  - and the client code that uses the same functions
 - Add ntlm_auth, a NTLMSSP authentication interface for use by applications
   like Squid and Apache.
  - also consquential changes to use common code for base64 encode/decode.
 - Winbind changes to support ntlm_auth (I don't want this program to need
   to read smb.conf, instead getting all it's details over the pipe).
 - nmbd changes for fstrcat() instead of fstrcpy().

Andrew Bartlett
(This used to be commit fbb46da79c)
2003-01-28 12:07:02 +00:00
cvs2svn Import User
2326525950 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit b741abd496) 2003-01-28 03:37:15 +00:00
Andrew Bartlett
d92b21280e Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder.

The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for
use with Squid.  Unfortunetly the squid side doesn't quite support what we need
yet.

Changes to winbind to get us the info we need, and a couple of consequential
changes/cleanups in the rest of the code.

Andrew Bartlett
(This used to be commit fe50ca8f54)
2003-01-16 03:29:54 +00:00
Andrew Bartlett
d456bec06e Missed auth_ntlmssp.c in last night's checkin. Also keep track of the current
challenge in the NTLMSSP context.

Andrew Bartlett
(This used to be commit ba13e058d4)
2003-01-15 20:39:33 +00:00
Andrew Bartlett
10abfb3f87 Crash fixes:
- fix a crash when a second NTLMSSP session tried to free the first
 - fix a crash due to some NULL pointers in the Add Printer Wizard (or read
   printer code too it appears).  As far as I can tell it's just that the
   GUID just might not exist.

Andrew Bartlett
(This used to be commit 51b1413056)
2003-01-15 05:55:22 +00:00
Andrew Bartlett
212077afa2 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
(This used to be commit 2a1adb8f81)
2003-01-14 07:26:12 +00:00
Jeremy Allison
2ad16e942d Missing indirect in final free.
Jeremy.
(This used to be commit faf443e519)
2003-01-13 23:07:28 +00:00
Jeremy Allison
2467a2f0ce Merge of indirection fixes from HEAD.
Jeremy
(This used to be commit 67a0b30f50)
2003-01-13 23:07:26 +00:00
Andrew Bartlett
1276959d7c Always initialise this variable - and don't set the 'must change now' if it was
last changed at '0'.

We need to actually change this password sometime...

Andrew Bartlett
(This used to be commit 740bf439d2)
2003-01-13 21:49:49 +00:00
Andrew Bartlett
8a78a0a27a Patch from metze to add what he feels is the correct semantics for a Domain
Controller.  As we have had a number of attempts at this over the last little
while, I need to get my test rig going, and give this whole area a poke...

Meanwhile, if you want to use this, just adjust your 'auth methods' line to use
samstrict_dc...

Andrew Bartlett
(This used to be commit 18e598ec24)
2003-01-13 13:11:36 +00:00
Andrew Bartlett
e3293c7181 Updates to our NTLMSSP code:
This tries to extract our server-side code out of sessetup.c, and into a more
general lib.  I hope this is only a temporay resting place - I indend to
refactor it again into an auth-subsystem independent lib, using callbacks.

Move some of our our NTLMSSP #defines into a new file, and add two that I found
in the COMsource docs - we seem to have a double-up, but I've verified from
traces that the NTLMSSP_TARGET_TYPE_{DOMAIN,SERVER} is real.

This code also copes with ASCII clients - not that we will ever see any here,
but I hope to use this for HTTP, were we can get them.  Win2k authenticates
fine under forced ASCII, btw.

Tested with Win2k, NTLMv2 and Samba's smbclient.

Andrew Bartlett
(This used to be commit b6641badcb)
2003-01-13 12:48:37 +00:00
Andrew Bartlett
ac04f498a2 Fix to debian bug #171071 - we had the wrong dereference on the pointer to be
Realloc()ed, causing it to fail.

Big thanks to Sandor Sonfeld <sonf@linuxmail.org> for the debug, stack and
valgrind traces!

Andrew Bartlett
(This used to be commit 7abca6d281)
2003-01-13 12:21:07 +00:00