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

44 Commits

Author SHA1 Message Date
Alejandro Escanero Blanco
6132cf2a5c s3:auth/server_info: the primary rid should be in the groups rid array (bug #8798)
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May  9 19:36:01 CEST 2012 on sn-devel-104
2012-05-09 19:36:01 +02:00
Stefan Metzmacher
dab7b0e717 s3:auth: fill the sids array of the info3 in wbcAuthUserInfo_to_netr_SamInfo3() (bug #8739)
Originally, only the rid array was filled and foreign domain sids were omitted.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Feb  2 12:59:32 CET 2012 on sn-devel-104
2012-02-02 12:59:32 +01:00
Stefan Metzmacher
adbab7710d s3:auth: fix potential gap creation in wbcsids_to_samr_RidWithAttributeArray()
Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze
2012-02-02 11:25:08 +01:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Wilco Baan Hofman
c52b571506 Fix uninitialized memory problem in group_sids_to_info3 (fixes bug #8455).
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 23:32:58 CEST 2011 on sn-devel-104
2011-10-17 23:32:58 +02:00
Volker Lendecke
3dcec44f3e s3: Fix bug 8455 -- Samba PDC is looking up only primary user group
group_sids_to_info3 does a sid_peek_check_rid on the domain sid before adding
the rids to the array. If the domain sid is 0x0, then the check will always
fail.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Sep 17 00:51:27 CEST 2011 on sn-devel-104
2011-09-17 00:51:27 +02:00
Andrew Bartlett
d2a661a531 s3-auth Remove pointless destructor in make_server_info
All the callers allocate ->info3 as a talloc child already.

As regardes the TALLOC_ZERO(), I added this originally out of parinoia
many years ago.  We do not consistantly zero session keys in memory,
and for NTLMv2 and Kerberos they are random for each sesssion, so
breaking into smbd far enough to read an old session key isn't a
particularly interesting attack, compared with (say) reading the
keytab or the password database.  (NTLM and LM session keys are fixed
derivitives of the passwords however).

Andrew Bartlett
2011-07-20 09:17:15 +10:00
Andrew Bartlett
15123d96ff s3-auth inline make_auth_session_info into only caller 2011-07-20 09:17:15 +10:00
Andrew Bartlett
9fcc617ff5 s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the
authorization data of a user across the whole codebase.

This will allow of our session handling to be accomplished with common code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
9d96b78f31 s3-auth Remove pointless destructor
All the users of this structure allocate info3 on the session_info

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
6d741e918f s3-auth Use *unix_token rather than utok in struct auth3_session_info
This brings this structure one step closer to the struct auth_session_info.

A few SMB_ASSERT calls are added in some key places to ensure that
this pointer is initialised, to make tracing any bugs here easier in
future.

NOTE: Many of the users of this structure should be reviewed, as unix
and NT access checks are mixed in a way that should just be done using
the NT ACL.  This patch has not changed this behaviour however.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
d7d8a5ed94 s3-auth Add struct auth3_session_info to aid transition to auth_session info
This will allow a gradual conversion of the required elements from the
current struct auth_serversupplied_info.

This commit adds the structure definition and some helper functions to
copy between the two structures.

At this stage these structures and functions are IDENTICAL to the
existing code, and so show the past history of that code.  The plan is
to slowly modify them over the course of the patch series, so that the
changes being made a clear.

By using a seperate structure to auth_serversupplied_info we can
remove elements that are not needed after the authentication, and we
can choose a layout that best reflects the needs of runtime users,
rather than the internals of the authentication subsystem.

By eventually using the auth_session_info from auth.idl, we will gain
a single session authorization structure across the whole codebase,
allowing more code to be shared, and a much more transparent process
for forwarding authorization credentials over the named pipe proxy.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ff9b6682a0 s3-auth Rename user_session_key -> session_key to match auth_session_info 2011-04-05 06:32:07 +10:00
Günther Deschner
7e73214ebf s3-auth: use auth.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
2f36ef7225 s3-passdb: add passdb.h where needed.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
d85f140826 s3-winbind: remove global inclusion of libwbclient.
Guenther
2011-03-30 01:13:06 +02:00
Stefan Metzmacher
d7fa349052 s3:auth: change num_groups to from size_t to uint32_t
This will help with the change from UNIX_USER_TOKEN to security_unix_token

metze
2011-02-22 16:20:11 +11:00
Günther Deschner
ac4127a9f4 s3-auth: add copy_netr_SamBaseInfo().
Guenther

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-04 16:57:32 +01:00
Volker Lendecke
c6b5136f02 s3: Fix bug 7066 -- wbcAuthenticateEx gives unix times
We might eventually want to change this, but right now we get unix times
out of the winbind pipe struct
2010-12-19 23:25:06 +01:00
Volker Lendecke
097be4b101 s3: Make proper use of sid_check_is_in_xx routines
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov  5 15:35:59 UTC 2010 on sn-devel-104
2010-11-05 15:35:59 +00:00
Volker Lendecke
26b2a132ff s3: Fix a typo 2010-11-05 15:54:05 +01:00
Andreas Schneider
f22e6cf3b7 s3-rpc_server: Make auth_serversupplied_info const. 2010-10-15 11:34:03 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
0f8e032628 s3-netlogon: remove global include of netlogon.h.
This reduces precompiled headers by another 4 MB and also slightly speeds up the
build.

Guenther
2010-08-06 15:46:16 +02:00
Volker Lendecke
032bf5c629 s3: Fix a typo (missing space) 2010-07-24 11:19:42 +02:00
Volker Lendecke
17cd3d06cb s3: In copy_netr_SamInfo3 copy all of the sids array 2010-06-25 16:58:46 +02:00
Günther Deschner
4bb351ac80 s3-auth: Fix valgrind warning (unitialized var) in samu_to_SamInfo3().
Guenther

s3:auth do not fail if there are 0 group sids

Signed-off-by: Günther Deschner <gd@samba.org>
2010-06-11 15:11:31 +02:00
Simo Sorce
4fc36ca802 s3:auth fix samu->info3 conversion
Some pdb_get_ functions where missing because of previous mis-patching
2010-06-11 08:26:39 -04:00
Simo Sorce
e6456df148 s3:auth handle unix domain sids in samu
When we generate a user out of thin air we may end up adding sids
that are not part of the sam domain (unix domain sids).
Handle the case and preserve these sids as extra sids.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-07 22:53:07 +10:00
Simo Sorce
bd38c0d47d s3:auth fix info3 duplication function 2010-05-29 17:08:02 -04:00
Günther Deschner
c5eeb0d155 s3-auth: fix c++ buildwarnings.
Guenther
2010-05-28 02:49:37 +02:00
Simo Sorce
3bb819581b Fix Out of memory checks
Günther pushed an older version of the patch "s3:auth add function to copy a
netr_SamInfo3 structure" that was missing these fixes.
2010-05-27 19:23:54 -04:00
Simo Sorce
2a6a696e32 s3:auth add function to convert wbcAuthUserInfo to netr_SamInfo3
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 01:20:09 +02:00
Simo Sorce
d9cffc01be s3:auth use info3 in auth_serversupplied_info
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:53 +02:00
Simo Sorce
6713f3d945 s3:auth add function to copy a netr_SamInfo3 structure
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:27 +02:00
Simo Sorce
605cfef56c s3:auth: add function to convert samu to netr_SamInfo3
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:17 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
1d2dd47d31 s3-crypto: only include crypto headers when crypto is done.
Guenther
2010-05-18 00:44:27 +02:00
Matthias Dieter Wallnöfer
1a27343366 s3/s4:netlogon IDL - fix up "struct netr_SamInfo6" regarding the "forest" attribute
According to MS-NRPC 2.2.1.4.13 this should be the DNS domainname, not the
forest one.
2010-04-12 18:49:01 +02:00
Volker Lendecke
8e95db9eea s3: Move serverinfo_to_SamInfoX to auth/server_info.c 2010-04-11 22:59:47 +02:00
Volker Lendecke
80708b75f8 s3: Move make_server_info to auth/server_info.c 2010-04-11 22:59:46 +02:00