⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpc_samr.h

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 H
📖 第 1 页 / 共 4 页
字号:
/*    Unix SMB/CIFS implementation.   SMB parameters and setup   Copyright (C) Andrew Tridgell              1992-2000   Copyright (C) Luke Kenneth Casson Leighton 1996-2000   Copyright (C) Paul Ashton                  1997-2000   Copyright (C) Jean Fran鏾is Micouleau      1998-2001   Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002         This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.      This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.      You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#ifndef _RPC_SAMR_H /* _RPC_SAMR_H */#define _RPC_SAMR_H /******************************************************************* the following information comes from a QuickView on samsrv.dll, and gives an idea of exactly what is needed: x SamrAddMemberToAliasx SamrAddMemberToGroupSamrAddMultipleMembersToAliasx SamrChangePasswordUserx SamrCloseHandlex SamrConnectx SamrCreateAliasInDomainx SamrCreateGroupInDomainx SamrCreateUserInDomain? SamrDeleteAliasSamrDeleteGroupx SamrDeleteUserx SamrEnumerateAliasesInDomainSamrEnumerateDomainsInSamServerx SamrEnumerateGroupsInDomainx SamrEnumerateUsersInDomainSamrGetUserDomainPasswordInformationSamrLookupDomainInSamServer? SamrLookupIdsInDomainx SamrLookupNamesInDomainx SamrOpenAliasx SamrOpenDomainx SamrOpenGroupx SamrOpenUserx SamrQueryDisplayInformationx SamrQueryInformationAliasSamrQueryInformationDomain? SamrQueryInformationUserx SamrQuerySecurityObjectSamrRemoveMemberFromAliasSamrRemoveMemberFromForiegnDomainSamrRemoveMemberFromGroupSamrRemoveMultipleMembersFromAliasx SamrSetInformationAliasSamrSetInformationDomainx SamrSetInformationGroupx SamrSetInformationUserSamrSetMemberAttributesOfGroupSamrSetSecurityObjectSamrShutdownSamServerSamrTestPrivateFunctionsDomainSamrTestPrivateFunctionsUser********************************************************************/#define SAMR_CONNECT_ANON      0x00#define SAMR_CLOSE_HND         0x01#define SAMR_SET_SEC_OBJECT    0x02#define SAMR_QUERY_SEC_OBJECT  0x03#define SAMR_UNKNOWN_4         0x04 /* profile info? */#define SAMR_LOOKUP_DOMAIN     0x05#define SAMR_ENUM_DOMAINS      0x06#define SAMR_OPEN_DOMAIN       0x07#define SAMR_QUERY_DOMAIN_INFO 0x08#define SAMR_SET_DOMAIN_INFO   0x09#define SAMR_CREATE_DOM_GROUP  0x0a#define SAMR_ENUM_DOM_GROUPS   0x0b#define SAMR_ENUM_DOM_USERS    0x0d#define SAMR_CREATE_DOM_ALIAS  0x0e#define SAMR_ENUM_DOM_ALIASES  0x0f#define SAMR_QUERY_USERALIASES 0x10#define SAMR_LOOKUP_NAMES      0x11#define SAMR_LOOKUP_RIDS       0x12#define SAMR_OPEN_GROUP        0x13#define SAMR_QUERY_GROUPINFO   0x14#define SAMR_SET_GROUPINFO     0x15#define SAMR_ADD_GROUPMEM      0x16#define SAMR_DELETE_DOM_GROUP  0x17#define SAMR_DEL_GROUPMEM      0x18#define SAMR_QUERY_GROUPMEM    0x19#define SAMR_UNKNOWN_1A        0x1a#define SAMR_OPEN_ALIAS        0x1b#define SAMR_QUERY_ALIASINFO   0x1c#define SAMR_SET_ALIASINFO     0x1d#define SAMR_DELETE_DOM_ALIAS  0x1e#define SAMR_ADD_ALIASMEM      0x1f#define SAMR_DEL_ALIASMEM      0x20#define SAMR_QUERY_ALIASMEM    0x21#define SAMR_OPEN_USER         0x22#define SAMR_DELETE_DOM_USER   0x23#define SAMR_QUERY_USERINFO    0x24#define SAMR_SET_USERINFO2     0x25#define SAMR_QUERY_USERGROUPS  0x27#define SAMR_QUERY_DISPINFO    0x28#define SAMR_UNKNOWN_29        0x29#define SAMR_UNKNOWN_2a        0x2a#define SAMR_UNKNOWN_2b        0x2b#define SAMR_GET_USRDOM_PWINFO 0x2c#define SAMR_REMOVE_SID_FOREIGN_DOMAIN        0x2d#define SAMR_QUERY_DOMAIN_INFO2  0x2e /* looks like an alias for SAMR_QUERY_DOMAIN_INFO */#define SAMR_UNKNOWN_2f        0x2f#define SAMR_QUERY_DISPINFO3   0x30 /* Alias for SAMR_QUERY_DISPINFO				       with info level 3 */#define SAMR_UNKNOWN_31        0x31#define SAMR_CREATE_USER       0x32#define SAMR_QUERY_DISPINFO4   0x33 /* Alias for SAMR_QUERY_DISPINFO				       with info level 4 */#define SAMR_ADDMULTI_ALIASMEM 0x34#define SAMR_UNKNOWN_35        0x35#define SAMR_UNKNOWN_36        0x36#define SAMR_CHGPASSWD_USER    0x37#define SAMR_GET_DOM_PWINFO    0x38#define SAMR_CONNECT           0x39#define SAMR_SET_USERINFO      0x3A#define SAMR_CONNECT4          0x3E#define SAMR_CHGPASSWD3        0x3F#define SAMR_CONNECT5          0x40typedef struct logon_hours_info{	uint32 max_len; /* normally 1260 bytes */	uint32 offset;	uint32 len; /* normally 21 bytes */	uint8 hours[32];} LOGON_HRS;/* SAM_USER_INFO_23 */typedef struct sam_user_info_23{	/* TIMES MAY NOT IN RIGHT ORDER!!!! */	NTTIME logon_time;            /* logon time */	NTTIME logoff_time;           /* logoff time */	NTTIME kickoff_time;          /* kickoff time */	NTTIME pass_last_set_time;    /* password last set time */	NTTIME pass_can_change_time;  /* password can change time */	NTTIME pass_must_change_time; /* password must change time */	UNIHDR hdr_user_name;    /* NULL - user name unicode string header */	UNIHDR hdr_full_name;    /* user's full name unicode string header */	UNIHDR hdr_home_dir;     /* home directory unicode string header */	UNIHDR hdr_dir_drive;    /* home drive unicode string header */	UNIHDR hdr_logon_script; /* logon script unicode string header */	UNIHDR hdr_profile_path; /* profile path unicode string header */	UNIHDR hdr_acct_desc  ;  /* user description */	UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */	UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */	UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */	uint8 lm_pwd[16];    /* lm user passwords */	uint8 nt_pwd[16];    /* nt user passwords */	uint32 user_rid;      /* Primary User ID */	uint32 group_rid;     /* Primary Group ID */	uint32 acb_info; /* account info (ACB_xxxx bit-mask) */	uint32 fields_present; /* 0x09f8 27fa */	uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */	/* uint8 pad[2] */	uint32 ptr_logon_hrs; /* pointer to logon hours */	/* Was unknown_5. */	uint16 bad_password_count;	uint16 logon_count;	uint8 padding1[6];			uint8 passmustchange; /* 0x00 must change = 0x01 */	uint8 padding2;	uint8 pass[516];	UNISTR2 uni_user_name;    /* NULL - username unicode string */	UNISTR2 uni_full_name;    /* user's full name unicode string */	UNISTR2 uni_home_dir;     /* home directory unicode string */	UNISTR2 uni_dir_drive;    /* home directory drive unicode string */	UNISTR2 uni_logon_script; /* logon script unicode string */	UNISTR2 uni_profile_path; /* profile path unicode string */	UNISTR2 uni_acct_desc  ;  /* user description unicode string */	UNISTR2 uni_workstations; /* login from workstations unicode string */	UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */	UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */	LOGON_HRS logon_hrs;} SAM_USER_INFO_23;/* SAM_USER_INFO_24 */typedef struct sam_user_info_24{	uint8 pass[516];	uint16 pw_len;} SAM_USER_INFO_24;/* * NB. This structure is *definately* incorrect. It's my best guess * currently for W2K SP2. The password field is encrypted in a different * way than normal... And there are definately other problems. JRA. *//* SAM_USER_INFO_25 */typedef struct sam_user_info_25{	/* TIMES MAY NOT IN RIGHT ORDER!!!! */	NTTIME logon_time;            /* logon time */	NTTIME logoff_time;           /* logoff time */	NTTIME kickoff_time;          /* kickoff time */	NTTIME pass_last_set_time;    /* password last set time */	NTTIME pass_can_change_time;  /* password can change time */	NTTIME pass_must_change_time; /* password must change time */	UNIHDR hdr_user_name;    /* NULL - user name unicode string header */	UNIHDR hdr_full_name;    /* user's full name unicode string header */	UNIHDR hdr_home_dir;     /* home directory unicode string header */	UNIHDR hdr_dir_drive;    /* home drive unicode string header */	UNIHDR hdr_logon_script; /* logon script unicode string header */	UNIHDR hdr_profile_path; /* profile path unicode string header */	UNIHDR hdr_acct_desc  ;  /* user description */	UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */	UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */	UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */	uint8 lm_pwd[16];    /* lm user passwords */	uint8 nt_pwd[16];    /* nt user passwords */	uint32 user_rid;      /* Primary User ID */	uint32 group_rid;     /* Primary Group ID */	uint32 acb_info; /* account info (ACB_xxxx bit-mask) */	uint32 unknown_6[6];	uint8 pass[532];	UNISTR2 uni_user_name;    /* NULL - username unicode string */	UNISTR2 uni_full_name;    /* user's full name unicode string */	UNISTR2 uni_home_dir;     /* home directory unicode string */	UNISTR2 uni_dir_drive;    /* home directory drive unicode string */	UNISTR2 uni_logon_script; /* logon script unicode string */	UNISTR2 uni_profile_path; /* profile path unicode string */	UNISTR2 uni_acct_desc  ;  /* user description unicode string */	UNISTR2 uni_workstations; /* login from workstations unicode string */	UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */	UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */} SAM_USER_INFO_25;/* SAM_USER_INFO_21 */typedef struct sam_user_info_21{	NTTIME logon_time;            /* logon time */	NTTIME logoff_time;           /* logoff time */	NTTIME kickoff_time;          /* kickoff time */	NTTIME pass_last_set_time;    /* password last set time */	NTTIME pass_can_change_time;  /* password can change time */	NTTIME pass_must_change_time; /* password must change time */	UNIHDR hdr_user_name;    /* username unicode string header */	UNIHDR hdr_full_name;    /* user's full name unicode string header */	UNIHDR hdr_home_dir;     /* home directory unicode string header */	UNIHDR hdr_dir_drive;    /* home drive unicode string header */	UNIHDR hdr_logon_script; /* logon script unicode string header */	UNIHDR hdr_profile_path; /* profile path unicode string header */	UNIHDR hdr_acct_desc  ;  /* user description */	UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */	UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */	UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */	uint8 lm_pwd[16];    /* lm user passwords */	uint8 nt_pwd[16];    /* nt user passwords */	uint32 user_rid;      /* Primary User ID */	uint32 group_rid;     /* Primary Group ID */	uint32 acb_info; /* account info (ACB_xxxx bit-mask) */	/* Was unknown_3 */	uint32 fields_present; /* 0x00ff ffff */	uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */	/* uint8 pad[2] */	uint32 ptr_logon_hrs; /* unknown pointer */	/* Was unknown_5. */	uint16 bad_password_count;	uint16 logon_count;	uint8 padding1[6];			uint8 passmustchange; /* 0x00 must change = 0x01 */	uint8 padding2;	UNISTR2 uni_user_name;    /* username unicode string */	UNISTR2 uni_full_name;    /* user's full name unicode string */	UNISTR2 uni_home_dir;     /* home directory unicode string */	UNISTR2 uni_dir_drive;    /* home directory drive unicode string */	UNISTR2 uni_logon_script; /* logon script unicode string */	UNISTR2 uni_profile_path; /* profile path unicode string */	UNISTR2 uni_acct_desc  ;  /* user description unicode string */	UNISTR2 uni_workstations; /* login from workstations unicode string */	UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */	UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */	LOGON_HRS logon_hrs;} SAM_USER_INFO_21;#define PASS_MUST_CHANGE_AT_NEXT_LOGON	0x01#define PASS_DONT_CHANGE_AT_NEXT_LOGON	0x00/* SAM_USER_INFO_20 */typedef struct sam_user_info_20{	UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */	UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */} SAM_USER_INFO_20;/* SAM_USER_INFO_18 */typedef struct sam_user_info_18{	uint8 lm_pwd[16];    /* lm user passwords */	uint8 nt_pwd[16];    /* nt user passwords */	uint8 lm_pwd_active; 	uint8 nt_pwd_active; } SAM_USER_INFO_18;/* SAM_USER_INFO_17 */typedef struct sam_user_info_17{	uint8  padding_0[16];  /* 0 - padding 16 bytes */	NTTIME expiry;         /* expiry time or something? */	uint8  padding_1[24];  /* 0 - padding 24 bytes */	UNIHDR hdr_mach_acct;  /* unicode header for machine account */	uint32 padding_2;      /* 0 - padding 4 bytes */	uint32 ptr_1;          /* pointer */	uint8  padding_3[32];  /* 0 - padding 32 bytes */	uint32 padding_4;      /* 0 - padding 4 bytes */	uint32 ptr_2;          /* pointer */	uint32 padding_5;      /* 0 - padding 4 bytes */	uint32 ptr_3;          /* pointer */	uint8  padding_6[32];  /* 0 - padding 32 bytes */	uint32 rid_user;       /* user RID */	uint32 rid_group;      /* group RID */	uint16 acct_ctrl;      /* 0080 - ACB_XXXX */	uint16 unknown_3;      /* 16 bit padding */	uint16 unknown_4;      /* 0x003f      - 16 bit unknown */	uint16 unknown_5;      /* 0x003c      - 16 bit unknown */	uint8  padding_7[16];  /* 0 - padding 16 bytes */	uint32 padding_8;      /* 0 - padding 4 bytes */		UNISTR2 uni_mach_acct; /* unicode string for machine account */	uint8  padding_9[48];  /* 0 - padding 48 bytes */} SAM_USER_INFO_17;/* SAM_USER_INFO_16 */typedef struct sam_user_info_16{	uint32 acb_info;} SAM_USER_INFO_16;/* SAM_USER_INFO_7 */typedef struct sam_user_info_7{	UNIHDR hdr_name;  /* unicode header for name */	UNISTR2 uni_name; /* unicode string for name */} SAM_USER_INFO_7;/* SAM_USER_INFO_9 */typedef struct sam_user_info_9{	uint32 rid_group;     /* Primary Group RID */} SAM_USER_INFO_9;/* SAMR_Q_CLOSE_HND - probably a policy handle close */typedef struct q_samr_close_hnd_info{    POLICY_HND pol;          /* policy handle */} SAMR_Q_CLOSE_HND;/* SAMR_R_CLOSE_HND - probably a policy handle close */typedef struct r_samr_close_hnd_info{	POLICY_HND pol;       /* policy handle */	NTSTATUS status;         /* return status */} SAMR_R_CLOSE_HND;/****************************************************************************SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this*****************************************************************************//* SAMR_Q_GET_USRDOM_PWINFO */typedef struct q_samr_usrdom_pwinfo_info{	POLICY_HND user_pol;          /* policy handle */} SAMR_Q_GET_USRDOM_PWINFO;/****************************************************************************SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this*****************************************************************************//* SAMR_R_GET_USRDOM_PWINFO */typedef struct r_samr_usrdom_pwinfo_info{	uint16 unknown_0; /* 0000 */	uint16 unknown_1; /* 0x0016 or 0x0015 */	uint32 unknown_2; /* 0x0000 0000 */	NTSTATUS status; } SAMR_R_GET_USRDOM_PWINFO;/****************************************************************************SAMR_Q_SET_SEC_OBJ - info level 4.*****************************************************************************//* SAMR_Q_SET_SEC_OBJ - */typedef struct q_samr_set_sec_obj_info{	POLICY_HND pol;          /* policy handle */	uint32 sec_info;         /* xxxx_SECURITY_INFORMATION 0x0000 0004 */	SEC_DESC_BUF *buf;} SAMR_Q_SET_SEC_OBJ;/* SAMR_R_SET_SEC_OBJ - */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -