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

55 Commits

Author SHA1 Message Date
Andrew Bartlett
e2049e77e4 s3-auth Use guest boolean in auth_user_info_unix
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
9289537993 s3-auth Use struct auth_user_info_unix for unix_name and sanitized_username
This is closer to the layout of struct auth_session_info in auth.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +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
Günther Deschner
ee1f25dc2a lsa: lsa_CreateTrustedDomainEx takes lsa_TrustDomainInfoAuthInfo, not
lsa_TrustDomainInfoAuthInfoInternal.

Guenther
2011-07-15 17:56:39 +02:00
Günther Deschner
3af3e4843f lsa: rename auth info argument in lsa_CreateTrustedDomainEx2
Guenther
2011-07-15 17:55:20 +02:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02: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
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Günther Deschner
0e76eddcc8 s3: include ntdomain.h before including generated srv_ headers.
Guenther
2011-05-02 15:03:44 +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
Volker Lendecke
de635fe1f7 s3: Fix Coverity ID 2332: MISSING_BREAK 2011-03-30 09:58:33 +02:00
Günther Deschner
ab9a29eb63 s3-rpc_server: move access check functions out of samr server.
Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
c2d6260f10 s3: only include lib/privileges.h where needed.
This finally removes the global lsa.h inclusion.

Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
6e3f0d28a4 s3-includes: only include ntdomain.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
146c1aac99 s3-auth: rpc_server needs auth.h
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
Volker Lendecke
1d690e37b7 s3: Fix Coverity ID 2327: FORWARD_NULL
Make check_ft_info robust against an invalid type.

Günther, please check!
2011-03-27 11:25:34 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Volker Lendecke
a7a638c3cf s3: Fix Coverity ID 2213, PASS_BY_VALUE
There's little point to pass a copy of this structure on the stack.

Günther, please check!
2011-03-16 21:14:58 +01:00
Volker Lendecke
a282455978 s3: Fix Coverity ID 1012, CHECKED_RETURN
This is probably more or less taste. Removing the necessity for a comment is a
good thing though IMO.
2011-03-16 21:14:58 +01:00
Volker Lendecke
9c9ed33cb7 s3: Fix Coverity ID 1013, CHECKED_RETURN
This is probably more or less taste. Removing the necessity for a comment is a
good thing though IMO.
2011-03-16 21:14:58 +01:00
Volker Lendecke
f8a13c7dbc s3: Use dom_sid_string in _lsa_lookup_sids_internal 2011-03-03 22:08:49 +01:00
Andrew Bartlett
2e69e89456 s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.

The structure is also not ideal for it's current purpose.  Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session.  This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.

(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Günther Deschner
debd6da27a s3-lsa: fix some uninitialized variables in our lsa server.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb 21 18:47:30 CET 2011 on sn-devel-104
2011-02-21 18:47:30 +01:00
Günther Deschner
f037d42e9b s3-lsa: support trust objects in _lsa_QuerySecurity().
Guenther
2011-02-17 16:02:20 +01:00
Günther Deschner
fa43de063a s3-lsa: in _lsa_QuerySecurity() query the sd from the lsa policy handle.
Guenther
2011-02-17 16:02:20 +01:00
Günther Deschner
67dfc87291 s3-lsa: only proceed in _lsa_EnumTrustedDomainsEx when backend has trusted domain support.
Guenther
2011-02-17 16:02:20 +01:00
Sumit Bose
bfa7964da8 s3-ipasam: Add aliases for trusted domain user
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb 16 12:58:13 CET 2011 on sn-devel-104
2011-02-16 12:58:13 +01:00
Sumit Bose
d638f4a3b8 s3-lsa: Implement lsaRSetForestTrustInformation
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
33655d28b0 s3-lsa: Add and remove trusted domain account
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
7d53893dee s3-lsa: fix return code of _lsa_QueryTrustedDomainInfoByName()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:05 +01:00
Sumit Bose
a8ab5d582d s3-lsa: Extract auth info from trustDomainPasswords
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:05 +01:00
Sumit Bose
0b27317a5c s3-lsa: Use pdb_get_trusted_domain_by_sid in _lsa_QueryTrustedDomainInfo()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Sumit Bose
fbd846f427 s3-lsa: fix lsa_QueryTrustedDomainInfo
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Günther Deschner
4d22986541 s3-lsa: implement _lsa_OpenTrustedDomainByName().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Günther Deschner
cdd4df72d7 s3-lsa: implement _lsa_OpenTrustedDomain().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Sumit Bose
13c5211fa9 s3-lsa: Implement _lsa_EnumTrustedDomainsEx()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:03 +01:00
Günther Deschner
86771d8258 s3-lsa: implement _lsa_CloseTrustedDomainEx().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:03 +01:00
Günther Deschner
06245d1335 s3-lsa: implement _lsa_QueryTrustedDomainInfoByName().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:03 +01:00
Günther Deschner
b9eda2ac98 s3-lsa: implement _lsa_QueryTrustedDomainInfoBySid().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:03 +01:00
Günther Deschner
1ce0d9791b s3-lsa: implement _lsa_QueryTrustedDomainInfo().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:02 +01:00
Sumit Bose
bb947089af s3-lsa: make _lsa_DeleteTrustedDomain() use pdb_del_trusted_domain().
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:43:45 +01:00
Günther Deschner
12d16af9d6 s3-lsa: implement _lsa_DeleteTrustedDomain().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:43:28 +01:00
Sumit Bose
f6004a1cfd s3-lsa: make lsa_lookup_trusted_domain_by_name() use pdb_get_trusted_domain().
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:43:18 +01:00
Günther Deschner
387e37efce s3-lsa: add lsa_lookup_trusted_domain_by_name and lsa_lookup_trusted_domain_by_sid.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:35:20 +01:00
Günther Deschner
39c9f59dba s3-lsa: implement _lsa_CreateTrustedDomain().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:35:20 +01:00
Günther Deschner
55bc1cfae3 s3-lsa: implement _lsa_CreateTrustedDomainEx().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:35:20 +01:00