summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-10 14:48:05 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-10 14:48:05 +0000
commitc5e739febe5ab3bcc5d147fe791c788ec72531a3 (patch)
treecbb87b08ca03c05b27e6cf80c281ef4d1505f0a5 /source3/include
parent33d8f5ecbb869edbdfe0f958c989a3fcb7a056ff (diff)
downloadsamba-c5e739febe5ab3bcc5d147fe791c788ec72531a3.tar.gz
samba-c5e739febe5ab3bcc5d147fe791c788ec72531a3.tar.bz2
samba-c5e739febe5ab3bcc5d147fe791c788ec72531a3.zip
Makefile:
added credentials.c to smbd credentials.c: using credential structures instead of char* password.c uid.c server.c: added sid and attr to user_struct. smbdes.c: smbhash and str_to_key make public instead of private. pipes.c smb.h: lsa structures, sub-functions. proto.h: usual. (This used to be commit 87a0a944855a673d693d934e446bdc231b1c7f02)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h17
-rw-r--r--source3/include/smb.h43
2 files changed, 52 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 009d83db5c..94937daade 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -60,6 +60,15 @@ int process_tar(char *inbuf, char *outbuf);
int clipfind(char **aret, int ret, char *tok);
int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind);
+/*The following definitions come from credentials.c */
+
+void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
+ char *session_key);
+void cred_create(char *session_key, DOM_CHAL *stored_cred, UTIME timestamp,
+ DOM_CHAL *cred);
+int cred_assert(DOM_CHAL *cred, char *session_key, DOM_CHAL *stored_cred,
+ UTIME timestamp);
+
/*The following definitions come from dir.c */
void init_dptrs(void);
@@ -629,10 +638,11 @@ BOOL api_LsarpcTNP(int cnum,int uid, char *param,char *data,
char **rdata,char **rparam,
int *rdata_len,int *rparam_len);
char *dom_sid_to_string(DOM_SID *sid);
-BOOL api_ntlsarpcTNP(int cnum,int uid, char *param,char *data,
+BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
int mdrcnt,int mprcnt,
char **rdata,char **rparam,
int *rdata_len,int *rparam_len);
+void no_fn(uint uid);
/*The following definitions come from predict.c */
@@ -755,7 +765,8 @@ BOOL request_oplock_break(min_share_mode_entry *share_entry,
BOOL snum_used(int snum);
BOOL reload_services(BOOL test);
int setup_groups(char *user, int uid, int gid, int *p_ngroups,
- int **p_igroups, gid_t **p_groups);
+ int **p_igroups, gid_t **p_groups,
+ int **p_attrs);
int make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid);
int find_free_file(void );
int reply_corep(char *outbuf);
@@ -791,6 +802,8 @@ BOOL smb_shm_get_usage(int *bytes_free,
/*The following definitions come from smbdes.c */
+void str_to_key(unsigned char *str,unsigned char *key);
+void smbhash(unsigned char *out, unsigned char *in, unsigned char *key);
void E_P16(unsigned char *p14,unsigned char *p16);
void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 54ce9e88e8..87fcb22cac 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -877,7 +877,8 @@ Response:
*/
-struct smb_passwd {
+struct smb_passwd
+{
int smb_userid;
char *smb_name;
unsigned char *smb_passwd; /* Null if no password */
@@ -886,12 +887,14 @@ struct smb_passwd {
};
-struct current_user {
+struct current_user
+{
int cnum, id;
int uid, gid;
int ngroups;
gid_t *groups;
int *igroups;
+ int *attrs;
};
typedef struct
@@ -988,35 +991,63 @@ typedef struct
char *user; /* name of user who *opened* this connection */
int uid; /* uid of user who *opened* this connection */
int gid; /* gid of user who *opened* this connection */
+
uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */
+
/* following groups stuff added by ih */
+
/* This groups info is valid for the user that *opened* the connection */
int ngroups;
gid_t *groups;
int *igroups; /* an integer version - some OSes are broken :-( */
+ int *attrs;
+
time_t lastused;
BOOL used;
int num_files_open;
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
+
} connection_struct;
+/* Domain controller authentication protocol info */
+struct dcinfo
+{
+ DOM_CHAL clnt_chal; /* Initial challenge received from client */
+ DOM_CHAL srv_chal; /* Initial server challenge */
+ DOM_CHAL clnt_cred; /* Last client credential */
+ DOM_CHAL srv_cred; /* Last server credential */
+
+ char sess_key[8]; /* Session key */
+ uchar md4pw[16]; /* md4(machine password) */
+};
typedef struct
{
int uid; /* uid of a validated user */
int gid; /* gid of a validated user */
+
fstring name; /* name of a validated user */
+ fstring real_name; /* to store real name from password file - simeon */
BOOL guest;
+
/* following groups stuff added by ih */
/* This groups info is needed for when we become_user() for this uid */
- int user_ngroups;
- gid_t *user_groups;
- int *user_igroups; /* an integer version - some OSes are broken :-( */
+ int n_groups;
+ gid_t *groups;
+ int *igroups; /* an integer version - some OSes are broken :-( */
+ int *attrs; /* attributes associated with each gid */
+
#if (defined(NETGROUP) && defined(AUTOMOUNT))
char *home_share; /* to store NIS home of a user - simeon */
#endif
- char *real_name; /* to store real name from password file - simeon */
+
+ int n_sids;
+ int *sids;
+
+ /* per-user authentication information on NT RPCs */
+ struct dcinfo dc;
+
} user_struct;