summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-31 10:46:25 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-31 10:46:25 +0000
commit60f0627afb167faad57385d44f0b587186a7ac2b (patch)
treef7a03b2e1b90d1234c48fffaeaf92986060a0e77 /source3/include
parent83575bd3868ef3993107460d2c8e05f382eae351 (diff)
downloadsamba-60f0627afb167faad57385d44f0b587186a7ac2b.tar.gz
samba-60f0627afb167faad57385d44f0b587186a7ac2b.tar.bz2
samba-60f0627afb167faad57385d44f0b587186a7ac2b.zip
This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code. In particular this assists tpot in some of his work, becouse it provides the connection between the authenticaion and the vuid generation. Major Changes: - Fully malloc'ed structures. - Massive rework of the code so that all structures are made and destroyed using malloc and free, rather than hanging around on the stack. - SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them to be declared 'invalid' without the chance that people might get ROOT by default. - kill off some of the "DOMAIN\user" lookups. These can be readded at a more appropriate place (probably domain_client_validate.c) in the future. They don't belong in session setups. - Massive introduction of DATA_BLOB structures, particularly for passwords. - Use NTLMSSP flags to tell the backend what its getting, rather than magic lenghths. - Fix winbind back up again, but tpot is redoing this soon anyway. - Abstract much of the work in srv_netlog_nt back into auth helper functions. This is a LARGE change, and any assistance is testing it is appriciated. Domain logons are still broken (as far as I can tell) but other functionality seems intact. Needs testing with a wide variety of MS clients. Andrew Bartlett (This used to be commit f70fb819b2f57bd57232b51808345e2319d52f6c)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/auth.h53
-rw-r--r--source3/include/smb.h4
2 files changed, 24 insertions, 33 deletions
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 9e99600e98..427cb8b489 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -35,58 +35,44 @@ typedef struct unicode_string
uchar *unistr;
} AUTH_UNISTR;
-/* AUTH_BUFFER - 8-bit byte buffer */
-typedef struct auth_buffer
-{
- int len;
- uint8 *buffer;
-} AUTH_BUFFER;
-
-typedef struct net_password
-{
- AUTH_BUFFER lm_resp;
- AUTH_BUFFER nt_resp;
-} auth_net_password;
-
typedef struct interactive_password
{
OWF_INFO lm_owf; /* LM OWF Password */
OWF_INFO nt_owf; /* NT OWF Password */
} auth_interactive_password;
-typedef struct plaintext_password
-{
- AUTH_STR password;
-} auth_plaintext_password;
-
typedef struct usersupplied_info
{
- AUTH_BUFFER lm_resp;
- AUTH_BUFFER nt_resp;
+ DATA_BLOB lm_resp;
+ DATA_BLOB nt_resp;
auth_interactive_password * interactive_password;
- AUTH_STR plaintext_password;
+ DATA_BLOB plaintext_password;
- uint8 chal[8];
+ BOOL encrypted;
+
+ uint32 ntlmssp_flags;
+
+ DATA_BLOB sec_blob;
- AUTH_STR requested_domain; /* domain name string */
+ AUTH_STR client_domain; /* domain name string */
AUTH_STR domain; /* domain name after mapping */
- AUTH_STR unix_username; /* username after mapping */
- AUTH_STR smb_username; /* username before mapping */
+ AUTH_STR internal_username; /* username after mapping */
+ AUTH_STR smb_name; /* username before mapping */
AUTH_STR wksta_name; /* workstation name (netbios calling name) unicode string */
} auth_usersupplied_info;
+#define SAM_FILL_NAME 0x01
+#define SAM_FILL_INFO3 0x02
+#define SAM_FILL_SAM 0x04
+#define SAM_FILL_UNIX 0x08
+#define SAM_FILL_ALL (SAM_FILL_NAME | SAM_FILL_INFO3 | SAM_FILL_SAM | SAM_FILL_UNIX)
+
typedef struct serversupplied_info
{
- AUTH_STR full_name;
- AUTH_STR unix_user;
-
BOOL guest;
- uid_t unix_uid;
- gid_t unix_gid;
-
/* This groups info is needed for when we become_user() for this uid */
int n_groups;
gid_t *groups;
@@ -98,6 +84,11 @@ typedef struct serversupplied_info
uchar session_key[16];
+ uint8 first_8_lm_hash[8];
+
+ uint32 sam_fill_level; /* How far is this structure filled? */
+
+ SAM_ACCOUNT *sam_account;
} auth_serversupplied_info;
#endif /* _SMBAUTH_H_ */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index dea5bb66df..0e48b4c6c0 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -591,8 +591,8 @@ typedef struct sam_passwd
pstring unknown_str ; /* don't know what this is, yet. */
pstring munged_dial ; /* munged path name and dial-back tel number */
- uid_t uid; /* this is actually the unix uid_t */
- gid_t gid; /* this is actually the unix gid_t */
+ uid_t *uid; /* this is a pointer to the unix uid_t */
+ gid_t *gid; /* this is a pointer to the unix gid_t */
uint32 user_rid; /* Primary User ID */
uint32 group_rid; /* Primary Group ID */