diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-11 22:26:28 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-11 22:26:28 +0000 |
commit | b840dce67639b8d270eaac27b29d7392981f55bd (patch) | |
tree | 075eb0e152aad50f6bfc6b1724ad3b9f639aded9 /source3/include | |
parent | 02fe94f86543dcaa068de59eb4b1928e6f4086e4 (diff) | |
download | samba-b840dce67639b8d270eaac27b29d7392981f55bd.tar.gz samba-b840dce67639b8d270eaac27b29d7392981f55bd.tar.bz2 samba-b840dce67639b8d270eaac27b29d7392981f55bd.zip |
Moved cruft out of smb.h into ntdomain.h where it belongs. dc struct
now in pipe struct (where used) rather than user_struct.
Secured machine account password changing in srv_netlog_nt.c - ensure
that only the given machine can change its own password. May need to
free this up later for NT admin tools, but this is a fail-safe secure
position for now.
Jeremy.
(This used to be commit 46b12f2275dcd4b3114085160cd456441f9e921e)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ntdomain.h | 33 | ||||
-rw-r--r-- | source3/include/proto.h | 32 | ||||
-rw-r--r-- | source3/include/rpc_misc.h | 13 | ||||
-rw-r--r-- | source3/include/smb.h | 45 |
4 files changed, 29 insertions, 94 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index a3fd51948d..799fa6d907 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -24,7 +24,6 @@ #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */ #define _NT_DOMAIN_H - /* dce/rpc support */ #include "rpc_dce.h" @@ -137,21 +136,6 @@ typedef struct _input_data { prs_struct data; } input_data; -struct msrpc_state -{ - fstring pipe_name; - struct user_creds usr; - struct ntdom_info nt; - - int fd; - BOOL redirect; - BOOL initialised; - char *inbuf; - char *outbuf; - - uint32 pid; -}; - /* * Handle database - stored per pipe. */ @@ -173,12 +157,26 @@ struct handle_list { size_t count; }; +/* Domain controller authentication protocol info */ +struct dcinfo +{ + DOM_CHAL clnt_chal; /* Initial challenge received from client */ + DOM_CHAL srv_chal; /* Initial server challenge */ + DOM_CRED clnt_cred; /* Last client credential */ + DOM_CRED srv_cred; /* Last server credential */ + + uchar sess_key[8]; /* Session key */ + uchar md4pw[16]; /* md4(machine password) */ + + fstring mach_acct; /* Machine name we've authenticated. */ +}; + typedef struct pipes_struct { struct pipes_struct *next, *prev; int pnum; connection_struct *conn; - uint16 vuid; + uint16 vuid; /* points to the unauthenticated user that opened this pipe. */ BOOL open; /* open connection */ uint16 device_state; uint16 priority; @@ -194,6 +192,7 @@ typedef struct pipes_struct unsigned char challenge[8]; unsigned char ntlmssp_hash[258]; uint32 ntlmssp_seq_num; + struct dcinfo dc; /* Keeps the creds data. */ /* * Windows user info. diff --git a/source3/include/proto.h b/source3/include/proto.h index c1271e7d27..774f623adb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -159,38 +159,6 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len int ms_fnmatch(char *pattern, char *string); -/*The following definitions come from lib/msrpc-client.c */ - -BOOL receive_msrpc(int fd, prs_struct *data, unsigned int timeout); -BOOL msrpc_send(int fd, prs_struct *ps); -BOOL msrpc_receive(int fd, prs_struct *ps); -BOOL msrpc_connect(struct msrpc_state *msrpc, const char *pipe_name); -void msrpc_init_creds(struct msrpc_state *msrpc, const struct user_creds *usr); -void msrpc_close_socket(struct msrpc_state *msrpc); -void msrpc_sockopt(struct msrpc_state *msrpc, char *options); -BOOL msrpc_connect_auth(struct msrpc_state *msrpc, - uint32 pid, - const char* pipename, - const struct user_creds *usr); -struct msrpc_state *msrpc_initialise(struct msrpc_state *msrpc, uint32 pid); -void msrpc_shutdown(struct msrpc_state *msrpc); -BOOL msrpc_establish_connection(struct msrpc_state *msrpc, - const char *pipe_name); - -/*The following definitions come from lib/msrpc_use.c */ - -void init_msrpc_use(void); -void free_msrpc_use(void); -struct msrpc_state *msrpc_use_add(const char* pipe_name, - uint32 pid, - struct user_creds *usr_creds, - BOOL redir); -BOOL msrpc_use_del(const char* pipe_name, - const struct user_creds *usr_creds, - BOOL force_close, - BOOL *connection_closed); -void msrpc_net_use_enum(uint32 *num_cons, struct use_info ***use); - /*The following definitions come from lib/pidfile.c */ pid_t pidfile_pid(char *name); diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h index 5152df8e0f..428db938de 100644 --- a/source3/include/rpc_misc.h +++ b/source3/include/rpc_misc.h @@ -247,6 +247,19 @@ typedef struct log_info } DOM_LOG_INFO; +/* DOM_CHAL - challenge info */ +typedef struct chal_info +{ + uchar data[8]; /* credentials */ +} DOM_CHAL; + +/* DOM_CREDs - timestamped client or server credentials */ +typedef struct cred_info +{ + DOM_CHAL challenge; /* credentials */ + UTIME timestamp; /* credential time-stamp */ +} DOM_CRED; + /* DOM_CLNT_INFO - client info */ typedef struct clnt_info { diff --git a/source3/include/smb.h b/source3/include/smb.h index ab1cd60f66..ba0a02e950 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -425,25 +425,12 @@ typedef struct domain_grp_member_info } DOMAIN_GRP_MEMBER; -/* DOM_CHAL - challenge info */ -typedef struct chal_info -{ - uchar data[8]; /* credentials */ -} DOM_CHAL; - /* 32 bit time (sec) since 01jan1970 - cifs6.txt, section 3.5, page 30 */ typedef struct time_info { uint32 time; } UTIME; -/* DOM_CREDs - timestamped client or server credentials */ -typedef struct cred_info -{ - DOM_CHAL challenge; /* credentials */ - UTIME timestamp; /* credential time-stamp */ -} DOM_CRED; - /* Structure used when SMBwritebmpx is active */ typedef struct { @@ -581,19 +568,6 @@ struct current_user #define EXCLUSIVE_BREAK_SENT 1 #define LEVEL_II_BREAK_SENT 2 -/* Domain controller authentication protocol info */ -struct dcinfo -{ - DOM_CHAL clnt_chal; /* Initial challenge received from client */ - DOM_CHAL srv_chal; /* Initial server challenge */ - DOM_CRED clnt_cred; /* Last client credential */ - DOM_CRED srv_cred; /* Last server credential */ - - uchar sess_key[8]; /* Session key */ - uchar md4pw[16]; /* md4(machine password) */ -}; - - typedef struct { fstring smb_name; /* user name from the client */ fstring unix_name; /* unix user name of a validated user */ @@ -1600,21 +1574,6 @@ struct pwd_info uchar sess_key[16]; }; -struct ntdom_info -{ - unsigned char sess_key[16]; /* Current session key. */ - unsigned char ntlmssp_hash[258]; /* ntlmssp data. */ - uint32 ntlmssp_cli_flgs; /* ntlmssp client flags */ - uint32 ntlmssp_srv_flgs; /* ntlmssp server flags */ - uint32 ntlmssp_seq_num; /* ntlmssp sequence number */ - DOM_CRED clnt_cred; /* Client credential. */ - - int max_recv_frag; - int max_xmit_frag; - - vuser_key key; -}; - /* * Network Computing Architechture Context Name Named Pipe * See MSDN docs for more information @@ -1648,10 +1607,6 @@ typedef struct user_struct gid_t *groups; NT_USER_TOKEN *nt_user_token; - - /* per-user authentication information on NT RPCs */ - /* lkclXXXX - THIS SHOULD NOT BE HERE! */ - struct dcinfo dc; } user_struct; #include "ntdomain.h" |