1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

485 Commits

Author SHA1 Message Date
Volker Lendecke
8e5bea3f84 r11916: auth_get_sam_account is only used in auth_rhosts.c -- move it there 2007-10-10 11:05:35 -05:00
Jim McDonough
9b34f2d0f4 r11886: Fix 3187: logon hours restrictions were off corresponding to our offset from
GMT.  Use gmtime() instead of localtime() in the calc, but still use
localtime() in displaying it.
2007-10-10 11:05:33 -05:00
Gerald Carter
8bead2d282 r11661: Store the INFO3 in the PAC data into the netsamlogon_cache.
Also remove the mem_ctx from the netsamlogon_cache_store() API.

Guenther, what should we be doing with the other fields in
the PAC_LOGON_INFO?
2007-10-10 11:05:23 -05:00
Gerald Carter
0c2bb5ba7b r11652: Reinstate the netsamlogon_cache in order to work
around failed query_user calls.  This fixes
logons to a member of a Samba domain as a user from a
trusted AD domain.

As per comments on samba-technical, I still need to add

(a) cache the PAC info as werll as NTLM net_user_info_3
(b) expire the cache when the SMB session goes away

Both Jeremy and Guenther have signed off on the idea.
2007-10-10 11:05:23 -05:00
Jeremy Allison
d1caef8663 r11573: Adding Andrew Bartlett's patch to make machine account
logons work if the client gives the MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
or MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT flags. This changes
the auth module interface to 2 (from 1). The effect of this is
that clients can access resources as a machine account if they
set these flags. This is the same as Windows (think of a VPN
where the vpn client authenticates itself to a VPN server
using machine account credentials - the vpn server checks
that the machine password was valid by performing a machine
account check with the PDC in the same was as it would a
user account check. I may add in a restriction (parameter)
to allow this behaviour to be turned off (as it was previously).
That may be on by default.
Andrew Bartlett please review this change carefully.
Jeremy.
2007-10-10 11:05:20 -05:00
Jeremy Allison
37e6ef9389 r11492: Fix bug #3224 (I hope). Correctly use machine_account_name
and client_name when doing netlogon credential setup.
Jeremy.
2007-10-10 11:05:18 -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
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
67be4ee41c r10234: Add new auth module "auth_script" to allow valid users to
be provisioned on demand - calls script with domain,
username, challenge and LM and NT responses - passing
the info through a pipe.
Jeremy.
2007-10-10 11:03:38 -05:00
Gerald Carter
e1de6f238f r9588: remove netsamlogon_cache interface...everything seems to work fine. Will deal with any fallout from special environments using a non-cache solution 2007-10-10 11:03:22 -05:00
Jeremy Allison
c63ad85b8c r9252: 2 type fixes from Luke Mewburn <lukem@NetBSD.org>. Bugid #2934.
Jeremy.
2007-10-10 11:00:29 -05:00
Volker Lendecke
9ae1098d21 r8889: Another warning 2007-10-10 11:00:19 -05:00
Jim McDonough
0446319a3b r8432: Fix #2077 - login to trusted domain doesn't allow home drive map and login
scripts to be executed.

We were filling in our name as the server which processed the login, even
when it was done by a trusted DC.

Thanks to John Janosik <jpjanosi@us.ibm.com> for the fix.
2007-10-10 11:00:05 -05:00
Jeremy Allison
f318c37107 r7956: Spelling mistake.
Jeremy.
2007-10-10 10:58:04 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Gerald Carter
5de1ffce2f r7450: fix my bone head mistake with ntlm authentcation and 'map to guest = bad uid'; make sure the authentication suceeds 2007-10-10 10:57:09 -05:00
Gerald Carter
b7455fbf81 r7395: * new feature 'map to guest = bad uid' (based on patch from
aruna.prabakar@hp.com).

This re-enables the Samba 2.2 behavior where a user that was
successfully authenticated by a remote DC would be mapped
to the guest account if there was not existing UNIX account
for that user and we could not create one.
2007-10-10 10:57:08 -05:00
Gerald Carter
4cda2bd035 r7372: abartet's patch for BUG 2391 (segv caused by free a static pointer) 2007-10-10 10:57:06 -05:00
Volker Lendecke
94acb93f57 r7243: Don't look at gencache.tdb for the trusted domains if winbind is around.
Volker
2007-10-10 10:57:05 -05:00
Gerald Carter
318c3db4cb r7130: remove 'winbind enable local accounts' code from the 3.0 tree 2007-10-10 10:57:01 -05:00
Gerald Carter
c70c5c4ee9 r7024: reverting mistaken commit 2007-10-10 10:57:00 -05:00
Gerald Carter
3a91b20e4b r7020: fixing printer ace values and getting rid of false compiler warning about unitialized variable 2007-10-10 10:57:00 -05:00
Volker Lendecke
61d40ac60d r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?

Volker
2007-10-10 10:56:41 -05:00
Volker Lendecke
3493d9f383 r6263: Get rid of generate_wellknown_sids, they are const static and initializable
statically.

Volker
2007-10-10 10:56:33 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Jeremy Allison
6f5ea963ab 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.
2007-10-10 10:55:54 -05:00
Volker Lendecke
eb4ef94f24 r5647: Caches are good for performance, but you get a consistency problem.
Fix bug # 2401.

Volker
2007-10-10 10:55:53 -05:00
Gerald Carter
8bff048650 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
2007-10-10 10:55:47 -05:00
Günther Deschner
8f143b6800 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
2007-10-10 10:55:45 -05:00
Gerald Carter
0edcfc7fa2 r5431: couple of cimpile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2341 & 2342 2007-10-10 10:55:40 -05:00
Gerald Carter
fec9cb7daa r5385: when operating in security = domain, allow domain admins to manage rigths assignments 2007-10-10 10:55:39 -05:00
Volker Lendecke
e7dc9fde45 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
2007-10-10 10:55:37 -05:00
Günther Deschner
3d391ef149 r5264: Log with loglevel 0 when account-administration scripts fail.
Guenther
2007-10-10 10:55:35 -05:00
Günther Deschner
1eabfa050b r4972: Fix a warning and some debugging-outputs.
Guenther
2007-10-10 10:55:10 -05:00
Gerald Carter
41dc7f7573 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.
2007-10-10 10:53:55 -05:00
Gerald Carter
77c10ff9aa 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.
2007-10-10 10:53:51 -05:00
Gerald Carter
9ade9bf49c 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 2007-10-10 10:53:48 -05:00
Günther Deschner
bd4c5125d6 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
2007-10-10 10:53:41 -05:00
Jeremy Allison
6b25a6e088 r4236: More *alloc fixes.
Jeremy.
2007-10-10 10:53:39 -05:00
Jeremy Allison
620f2e608f 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.
2007-10-10 10:53:32 -05:00
Volker Lendecke
b94838aff1 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
2007-10-10 10:53:15 -05:00
Andrew Bartlett
cb27c197ee 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
2007-10-10 10:53:10 -05:00
Volker Lendecke
3298f6105e 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
2007-10-10 10:53:09 -05:00
Gerald Carter
30ee2d5b09 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.
2007-10-10 10:53:02 -05:00
Tim Potter
1327d83d90 r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.
Bugzilla #1903.
2007-10-10 10:52:56 -05:00
Jeremy Allison
ba69c7229c r2703: Fix typo noticed by Igor Belyi <sambauser@katehok.ac93.org>
Jeremy.
2007-10-10 10:52:49 -05:00
Gerald Carter
4703a71fa8 r2086: fix bug with winbindd_getpwnam() caused by Microsoft DC's not filling in the username in the user_info3 2007-10-10 10:52:31 -05:00
Jeremy Allison
f454821ff5 r1780: Remove the UTC comment as it isn't.
Jeremy.
2007-10-10 10:52:20 -05:00
Jeremy Allison
9ce273ed66 r1778: Fix based on code from Richard Renard <rrenard@idealx.com> to
enforce logon hours. ldap fixes to follow.
Jeremy.
2007-10-10 10:52:20 -05:00
Andrew Bartlett
36741d3cf5 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
2007-10-10 10:52:13 -05:00