summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h102
1 files changed, 48 insertions, 54 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index b1efb4260a..57a62b7f1f 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -36,6 +36,8 @@
#define True (1)
#define Auto (2)
+typedef unsigned char BYTE;
+
#ifndef _BOOL
typedef int BOOL;
#define _BOOL /* So we don't typedef BOOL again in vfs.h */
@@ -307,58 +309,6 @@ typedef struct nttime_info
#define MAX_HOURS_LEN 32
-struct sam_passwd
-{
- time_t logon_time; /* logon time */
- time_t logoff_time; /* logoff time */
- time_t kickoff_time; /* kickoff time */
- time_t pass_last_set_time; /* password last set time */
- time_t pass_can_change_time; /* password can change time */
- time_t pass_must_change_time; /* password must change time */
-
- char *smb_name; /* username string */
- char *full_name; /* user's full name string */
- char *home_dir; /* home directory string */
- char *dir_drive; /* home directory drive string */
- char *logon_script; /* logon script string */
- char *profile_path; /* profile path string */
- char *acct_desc ; /* user description string */
- char *workstations; /* login from workstations string */
- char *unknown_str ; /* don't know what this is, yet. */
- char *munged_dial ; /* munged path name and dial-back tel number */
-
- uid_t smb_userid; /* this is actually the unix uid_t */
- gid_t smb_grpid; /* this is actually the unix gid_t */
- uint32 user_rid; /* Primary User ID */
- uint32 group_rid; /* Primary Group ID */
-
- unsigned char *smb_passwd; /* Null if no password */
- unsigned char *smb_nt_passwd; /* Null if no password */
-
- uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
- uint32 unknown_3; /* 0x00ff ffff */
-
- uint16 logon_divs; /* 168 - number of hours in a week */
- uint32 hours_len; /* normally 21 bytes */
- uint8 hours[MAX_HOURS_LEN];
-
- uint32 unknown_5; /* 0x0002 0000 */
- uint32 unknown_6; /* 0x0000 04ec */
-};
-
-struct smb_passwd
-{
- uid_t smb_userid; /* this is actually the unix uid_t */
- char *smb_name; /* username string */
-
- unsigned char *smb_passwd; /* Null if no password */
- unsigned char *smb_nt_passwd; /* Null if no password */
-
- uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
- time_t pass_last_set_time; /* password last set time */
-};
-
-
struct sam_disp_info
{
uint32 user_rid; /* Primary User ID */
@@ -701,6 +651,49 @@ typedef struct
#define SHAREMODE_FN(fn) \
void (*fn)(share_mode_entry *, char*)
+typedef struct sam_passwd
+{
+ time_t logon_time; /* logon time */
+ time_t logoff_time; /* logoff time */
+ time_t kickoff_time; /* kickoff time */
+ time_t pass_last_set_time; /* password last set time */
+ time_t pass_can_change_time; /* password can change time */
+ time_t pass_must_change_time; /* password must change time */
+
+ char *username; /* UNIX username string */
+ char *domain; /* Windows Domain name */
+ char *nt_username; /* Windows username string */
+ char *full_name; /* user's full name string */
+ char *home_dir; /* home directory string */
+ char *dir_drive; /* home directory drive string */
+ char *logon_script; /* logon script string */
+ char *profile_path; /* profile path string */
+ char *acct_desc ; /* user description string */
+ char *workstations; /* login from workstations string */
+ char *unknown_str ; /* don't know what this is, yet. */
+ char *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 */
+ uint32 user_rid; /* Primary User ID */
+ uint32 group_rid; /* Primary Group ID */
+
+ unsigned char *lm_pw; /* Null if no password */
+ unsigned char *nt_pw; /* Null if no password */
+
+ uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
+ uint32 unknown_3; /* 0x00ff ffff */
+
+ uint16 logon_divs; /* 168 - number of hours in a week */
+ uint32 hours_len; /* normally 21 bytes */
+ uint8 hours[MAX_HOURS_LEN];
+
+ uint32 unknown_5; /* 0x0002 0000 */
+ uint32 unknown_6; /* 0x0000 04ec */
+
+} SAM_ACCOUNT;
+
+#if 0 /* GWC */
/*
* Each implementation of the password database code needs
* to support the following operations.
@@ -755,16 +748,16 @@ struct passdb_ops {
struct sam_disp_info *(*getsamdisprid)(uint32);
struct sam_disp_info *(*getsamdispent)(void *);
-#if 0
/*
* password checking functions
*/
struct smb_passwd *(*smb_password_chal )(char *username, char lm_pass[24], char nt_pass[24], char chal[8]);
struct smb_passwd *(*smb_password_check )(char *username, char lm_hash[16], char nt_hash[16]);
struct passwd *(*unix_password_check)(char *username, char *pass, int pass_len);
-#endif
};
+#endif /* 0 */
+
/*
* Flags for local user manipulation.
*/
@@ -1667,6 +1660,7 @@ struct ncacn_np
};
#include "rpc_creds.h"
+#include "rpc_misc.h"
#include "rpc_secdes.h"
#include "nt_printing.h"