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

605 Commits

Author SHA1 Message Date
Günther Deschner
1e1e480115 r23928: Merge all "copy-info3-groups-to-sid-array" blocks to a sid_array_from_info3()
function.

Guenther
2007-10-10 12:28:45 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
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
073fdc5a58 r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Long overdue fix....
Jeremy.
2007-10-10 12:23:28 -05:00
Jeremy Allison
80d1da7e6c r23530: Fix bugs #4678 and #4697 which had the same root cause.
In make_server_info_pw() we assign a user SID in our
authoritative SAM, even though this may be from a
pure "Unix User" that doesn't exist in the SAM.
This causes lookups on "[in]valid users" to fail as they
will lookup this name as a "Unix User" SID to check against
the user token. Fix this by adding the "Unix User"\unix_username
SID to the sid array. The correct fix should probably be
changing the server_info->sam_account user SID to be a
S-1-22 Unix SID, but this might break old configs where
plaintext passwords were used with no SAM backend.
Jeremy
2007-10-10 12:23:26 -05:00
Michael Adam
efd3e2bfb7 r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
2007-10-10 12:23:21 -05:00
Jeremy Allison
2ea5a6bd33 r23358: Fix from Justin Maggard <jmaggard@infrant.com> - ensure we don't
expire a password if it's explicitly set as ACB_PWNOTREQ.
Jeremy.
2007-10-10 12:23:09 -05:00
James Peach
f1e8de4b57 r23095: Support systems that have their PAM headers in /usr/include/pam. 2007-10-10 12:22:45 -05:00
Jeremy Allison
039fb906af r22956: Fix security=server (bug #4622). Volker's patch
(slightly truncated by me). Will be in 3.0.25a.
Jeremy.
2007-10-10 12:22:11 -05:00
Volker Lendecke
f93b6353fe r22953: Well, this apparently has never been tested. But *this* code never saw a
release yet .... ;-))
2007-10-10 12:22:11 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Volker Lendecke
450e4d94f6 r22819: Fix Bug 4613. We just dumped the must change & friends. With the
pass_last_changed == 0 we now return "Change now!" instead of "Change
never"
2007-10-10 12:22:00 -05:00
Volker Lendecke
4ad9f8aa61 r22740: Move debug_*_user_token to token_utils.c 2007-10-10 12:21:53 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
f6fa3080fe r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
2007-10-10 12:19:44 -05:00
Gerald Carter
3b24dae9e7 r22390: Patchset sent to samba-technical to address the winbind
loop when allocating a new id for a SID:

auth_util.patch		Revert create_local_token() to
			the 3.0.24 codebase

idmap_type.patch	Have the caller fillin the
			id_map.xid.type field when
			resolving a SID so that if we allocate
			a new id, we know what type to use

winbindd_api.patch	Remove the WINBINDD_SIDS_TO_XIDS calls
			from the public winbindd interface
			for the 3.0.25 release

idmap_rid.patch		Cleanup the idmap_rid backend to not
			call back into winbindd to resolve
			the SID in order to verify it's type.
2007-10-10 12:19:30 -05:00
Volker Lendecke
9de16f25c1 r22135: Check in most of Michael Adam's net conf utility. A good share of this patch
is moving functions around to fix some linker dependencies for the registry.

Michael, I've renamed your auth_utils2.c to token_utils.c.

Thanks!

Volker
2007-10-10 12:19:16 -05:00
Andrew Bartlett
5fe3328e66 r22022: - Clarify the comments
- make sure never to free an uninitialised variable

- ensure to free result on getpwnam_alloc failure

Andrew Bartlett
2007-10-10 12:19:03 -05:00
Andrew Bartlett
e3e0ec25e6 r22020: Make it more clear that both the vuser struct and it's contents are
talloc_free()'ed at the end of a session.

Rework the passwd cache code to use talloc_unlink and
talloc_reference, to more carefully manage the cache.

Andrew Bartlett
2007-10-10 12:19:03 -05:00
Stefan Metzmacher
fa322f0cc9 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
2007-10-10 12:18:59 -05:00
Stefan Metzmacher
f948005ca6 r21999: remove useless casts
metze
2007-10-10 12:18:58 -05:00
Gerald Carter
c7df0cad82 r21940: Sorry Volker, I have to revert your revert in r21935.
We can talk about this later if you still feel that strongly
but I need to fix the build for now.
2007-10-10 12:18:50 -05:00
Volker Lendecke
08c29abc03 r21935: Revert obviously not sufficiently tested code -- sorry for the pain. I am afraid I was basically off the net for the day 2007-10-10 12:18:50 -05:00
Volker Lendecke
e5741e27c4 r21878: Fix a bug with smbd serving a windows terminal server: If winbind decides smbd
to be idle it might happen that smbd needs to do a winbind operation (for
example sid2name) as non-root. This then fails to get the privileged
pipe. When later on on the same connection another authentication request
comes in, we try to do the CRAP auth via the non-privileged pipe.

This adds a winbindd_priv_request_response() request that kills the existing
winbind pipe connection if it's not privileged.

Volker
2007-10-10 12:18:42 -05:00
Volker Lendecke
6226b30f38 r21870: Move sending auth_server keepalives out of the main loop into an idle event.
Volker
2007-10-10 12:18:41 -05:00
Volker Lendecke
2186e276a0 r21642: Fix bug 4365. Please note that this was only tested with Vista so far, it
needs testing with other clients as well. I'm afraid I'm visiting a conference
tomorrow and saturday, so I'd be happy to get support in this.

Thanks,

Volker
2007-10-10 12:18:20 -05:00
Günther Deschner
7edbb636f7 r21536: Fix copy/paste typo.
Guenther
2007-10-10 12:18:11 -05:00
Jeremy Allison
a6b55beae7 r21383: More possible "security=share" fixes. If a client
is sending LMv2 make sure we test with the password
blob in the LM field as well as the NT field.
Jeremy.
2007-10-10 12:17:59 -05:00
Jeremy Allison
45dcf62960 r21128: Fix Vista connecting to Samba in share level security.
Vista sends the NTLMv2 blob by default in the tconX
packet. Make sure we save off the workgroup the user
was logged into on the client in the sessionsetupX
and re-use it for the NTLMv2 calc.
Jeremy.
2007-10-10 12:17:41 -05:00
Volker Lendecke
3c879745cf r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
2007-10-10 12:17:10 -05:00
Simo Sorce
9e8715e4e1 r20774: I thought I committed this before Xmas holidays ...
This change is needed to make it possible to not expire
caches in disconnected mode.

Jerry, please can you look at this and confirm it is ok?

Simo.
2007-10-10 12:17:08 -05:00
Herb Lewis
90265c83ff r20268: merge -r 20261:20263 from samba_3_0_24
get rid of previous prototype warnings
2007-10-10 12:16:38 -05:00
James Peach
d6382092e7 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
2007-10-10 12:16:34 -05:00
Simo Sorce
4a81ee9608 r20169: Support for fallback to legacy mapping code was not completely tested.
Add necessary fixes.
2007-10-10 12:16:28 -05:00
Simo Sorce
50cd8bffee r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
2007-10-10 12:16:25 -05:00
Jeremy Allison
f83b6de44f r20098: Properly fix issues with create_token_from_username()
reported by James. Ensure that this function allocates
everything on the temporary context except the return
memory. Never call this with a null mem context, and
now use conn->mem_ctx instead in smbd/service.c.
Remove separate free functions for conn->ngroups
and conn->nt_user_token as they are now always
talloc'ed off the conn->mem_ctx. Future optimization
will be to remove conn->mem_ctx and make all objects
pointed to in the conn struct talloc'ed off conn itself.
Easy to free then :-).
Jeremy.
2007-10-10 12:16:24 -05:00
Jeremy Allison
0ffca7559e r20090: Fix a class of bugs found by James Peach. Ensure
we never mix malloc and talloc'ed contexts in the
add_XX_to_array() and add_XX_to_array_unique()
calls. Ensure that these calls always return
False on out of memory, True otherwise and always
check them. Ensure that the relevent parts of
the conn struct and the nt_user_tokens are
TALLOC_DESTROYED not SAFE_FREE'd.
James - this should fix your crash bug in both
branches.
Jeremy.
2007-10-10 12:16:24 -05:00
Volker Lendecke
fea52801de r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.

On that way it fixes creating keys with more than one element in the
path. This did not work before.

Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.

Volker
2007-10-10 12:16:18 -05:00
Simo Sorce
550f651499 r19980: Implement pam account stack checks when obey pam restrictions is true.
It was missing for security=server/domain/ads

Simo.
2007-10-10 12:16:17 -05:00
Volker Lendecke
fb3983ae1f r19773: TALLOC_FREE checks for NULL itself 2007-10-10 12:15:54 -05:00
Jim McDonough
21abbeaee9 r19058: Implement "user cannot change password", and complete "user must change
password at next logon" code.  The "password last set time" of zero now
means "user must change password", because that's how windows seems to
use it.  The "can change" and "must change" times are now calculated
based on the "last set" time and policies.

We use the "can change" field now to indicate that a user cannot change
a password by putting MAX_TIME_T in it (so long as "last set" time isn't
zero).  Based on this, we set the password-can-change bit in the
faked secdesc.
2007-10-10 12:15:06 -05:00
Volker Lendecke
adfc82f0e6 r19008: Fix a segfault 2007-10-10 12:14:57 -05:00
Volker Lendecke
157b2c0c26 r18665: Remove two type-punned warnings 2007-10-10 12:00:45 -05:00
Gerald Carter
5c00b5497b r18616: fix breakage after DLIST_ADD_END() changes for --with-pam 2007-10-10 11:52:00 -05:00
Stefan Metzmacher
2f58645b70 r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze
2007-10-10 11:51:59 -05:00
Gerald Carter
3da9f80c28 r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
2007-10-10 11:51:18 -05:00
Volker Lendecke
089b51e28c r18029: More C++ stuff 2007-10-10 11:43:23 -05:00
Volker Lendecke
70edd716ef r17924: Get rid of warnings now that talloc is merged.
Destructors now take a pointer to the "real" destroyed object as an argument.

Volker
2007-10-10 11:38:59 -05:00
Jeremy Allison
45d77ae122 r17875: Fix (rather theoretical, but still...) null deref found by
Stanford checker.
Jeremy.
2007-10-10 11:38:56 -05:00