diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2003-04-13 13:50:46 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2003-04-13 13:50:46 +0000 |
commit | a47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda (patch) | |
tree | 94fc3e2c3166e1fa14849e50468b7b529f9e3385 /source3/include | |
parent | 74b163a83a7c516abe8192e3965832efa2fa64a4 (diff) | |
parent | e2996e29c7fb4697b9d95fe17d316bd2dded9d17 (diff) | |
download | samba-a47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda.tar.gz samba-a47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda.tar.bz2 samba-a47d06a2c2c67cdc0b1dfc2d32df65f2b1bbeeda.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 381649916ecbaddefbb6ee0e6137b7cc73eb54b1)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/authdata.h | 152 | ||||
-rw-r--r-- | source3/include/fake_file.h | 46 | ||||
-rw-r--r-- | source3/include/ntquotas.h | 97 | ||||
-rw-r--r-- | source3/include/rpc_echo.h | 74 |
4 files changed, 369 insertions, 0 deletions
diff --git a/source3/include/authdata.h b/source3/include/authdata.h new file mode 100644 index 0000000000..0798b72bdf --- /dev/null +++ b/source3/include/authdata.h @@ -0,0 +1,152 @@ +/* + Unix SMB/CIFS implementation. + Kerberos authorization data + Copyright (C) Jim McDonough 2003 + + + 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 _AUTHDATA_H +#define _AUTHDATA_H + +#include "rpc_misc.h" + +#define PAC_TYPE_LOGON_INFO 1 +#define PAC_TYPE_SERVER_CHECKSUM 6 +#define PAC_TYPE_PRIVSVR_CHECKSUM 7 +#define PAC_TYPE_UNKNOWN_10 10 + +typedef struct unknown_type_10 { + NTTIME unknown_time; + uint16 len; + uint16 *username; /* might not be null terminated, so not UNISTR */ +} UNKNOWN_TYPE_10; + +typedef struct pac_signature_data { + uint32 type; + uint8 *signature; +} PAC_SIGNATURE_DATA; + +typedef struct group_membership { + uint32 rid; + uint32 attrs; +} GROUP_MEMBERSHIP; + +typedef struct group_membership_array { + uint32 count; + GROUP_MEMBERSHIP *group_membership; +} GROUP_MEMBERSHIP_ARRAY; + +typedef struct krb_sid_and_attrs { + uint32 sid_ptr; + uint32 attrs; + DOM_SID2 *sid; +} KRB_SID_AND_ATTRS; + +typedef struct krb_sid_and_attr_array { + uint32 count; + KRB_SID_AND_ATTRS *krb_sid_and_attrs; +} KRB_SID_AND_ATTR_ARRAY; + + +/* This is awfully similar to a samr_user_info_23, but not identical. + Many of the field names have been swiped from there, because it is + so similar that they are likely the same, but many have been verified. + Some are in a different order, though... */ +typedef struct pac_logon_info { + 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; /* user name unicode string header */ + UNIHDR hdr_full_name; /* user's full name unicode string header */ + UNIHDR hdr_logon_script; /* these last 4 appear to be in a different */ + UNIHDR hdr_profile_path; /* order than in the info23 */ + UNIHDR hdr_home_dir; + UNIHDR hdr_dir_drive; + + uint16 logon_count; /* number of times user has logged onto domain */ + uint16 reserved12; + + uint32 user_rid; + uint32 group_rid; + uint32 group_count; + uint32 group_membership_ptr; + uint32 user_flags; + + uint32 reserved13[4]; + UNIHDR hdr_dom_controller; + UNIHDR hdr_dom_name; + + uint32 ptr_dom_sid; + + uint32 reserved16[2]; + uint32 reserved17; /* looks like it may be acb_info */ + uint32 reserved18[7]; + + uint32 sid_count; + uint32 ptr_extra_sids; + + uint32 ptr_res_group_dom_sid; + uint32 res_group_count; + uint32 ptr_res_groups; + + UNISTR2 uni_user_name; /* user name unicode string header */ + UNISTR2 uni_full_name; /* user's full name unicode string header */ + UNISTR2 uni_logon_script; /* these last 4 appear to be in a different*/ + UNISTR2 uni_profile_path; /* order than in the info23 */ + UNISTR2 uni_home_dir; + UNISTR2 uni_dir_drive; + UNISTR2 uni_dom_controller; + UNISTR2 uni_dom_name; + DOM_SID2 dom_sid; + GROUP_MEMBERSHIP_ARRAY groups; + KRB_SID_AND_ATTR_ARRAY extra_sids; + DOM_SID2 res_group_dom_sid; + GROUP_MEMBERSHIP_ARRAY res_groups; + +} PAC_LOGON_INFO; + +typedef struct pac_info_ctr +{ + union + { + PAC_LOGON_INFO *logon_info; + PAC_SIGNATURE_DATA *srv_cksum; + PAC_SIGNATURE_DATA *privsrv_cksum; + UNKNOWN_TYPE_10 *type_10; + } pac; +} PAC_INFO_CTR; + +typedef struct pac_info_hdr { + uint32 type; + uint32 size; + uint32 offset; + uint32 offsethi; + PAC_INFO_CTR *ctr; +} PAC_INFO_HDR; + +typedef struct pac_data { + uint32 num_buffers; + uint32 version; + PAC_INFO_HDR *pac_info_hdr_ptr; +} PAC_DATA; + + +#endif diff --git a/source3/include/fake_file.h b/source3/include/fake_file.h new file mode 100644 index 0000000000..3fe60072e9 --- /dev/null +++ b/source3/include/fake_file.h @@ -0,0 +1,46 @@ +/* + Unix SMB/CIFS implementation. + FAKE FILE suppport, for faking up special files windows want access to + Copyright (C) Stefan (metze) Metzmacher 2003 + + 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 _FAKE_FILE_H +#define _FAKE_FILE_H + +enum FAKE_FILE_TYPE { + FAKE_FILE_TYPE_NONE = 0, + FAKE_FILE_TYPE_QUOTA +}; + +#define FAKE_FILE_NAME_QUOTA "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" + +typedef struct _FAKE_FILE_HANDLE { + enum FAKE_FILE_TYPE type; + TALLOC_CTX *mem_ctx; + void *pd; /* for private data */ + void (*free_pd)(void **pd); /* free private_data */ +} FAKE_FILE_HANDLE; + +typedef struct _FAKE_FILE { + const char *name; + enum FAKE_FILE_TYPE type; + void *(*init_pd)(TALLOC_CTX *men_ctx); + void (*free_pd)(void **pd); +} FAKE_FILE; + + +#endif /* _FAKE_FILE_H */ diff --git a/source3/include/ntquotas.h b/source3/include/ntquotas.h new file mode 100644 index 0000000000..1425e59bb8 --- /dev/null +++ b/source3/include/ntquotas.h @@ -0,0 +1,97 @@ +/* + Unix SMB/CIFS implementation. + NT QUOTA code constants + Copyright (C) Stefan (metze) Metzmacher 2003 + + 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 _NTQUOTAS_H +#define _NTQUOTAS_H + +/* + * details for Quota Flags: + * + * 0x20 Log Limit: log if the user exceeds his Hard Quota + * 0x10 Log Warn: log if the user exceeds his Soft Quota + * 0x02 Deny Disk: deny disk access when the user exceeds his Hard Quota + * 0x01 Enable Quotas: enable quota for this fs + * + */ + +#define QUOTAS_ENABLED 0x0001 +#define QUOTAS_DENY_DISK 0x0002 +#define QUOTAS_LOG_VIOLATIONS 0x0004 +#define CONTENT_INDEX_DISABLED 0x0008 +#define QUOTAS_LOG_THRESHOLD 0x0010 +#define QUOTAS_LOG_LIMIT 0x0020 +#define LOG_VOLUME_THRESHOLD 0x0040 +#define LOG_VOLUME_LIMIT 0x0080 +#define QUOTAS_INCOMPLETE 0x0100 +#define QUOTAS_REBUILDING 0x0200 +#define QUOTAS_0400 0x0400 +#define QUOTAS_0800 0x0800 +#define QUOTAS_1000 0x1000 +#define QUOTAS_2000 0x2000 +#define QUOTAS_4000 0x4000 +#define QUOTAS_8000 0x8000 + +#define SMB_NTQUOTAS_NO_LIMIT ((SMB_BIG_UINT)(-1)) +#define SMB_NTQUOTAS_NO_ENTRY ((SMB_BIG_UINT)(-2)) +#define SMB_NTQUOTAS_NO_SPACE ((SMB_BIG_UINT)(0)) +#define SMB_NTQUOTAS_1_B (SMB_BIG_UINT)0x0000000000000001 +#define SMB_NTQUOTAS_1KB (SMB_BIG_UINT)0x0000000000000400 +#define SMB_NTQUOTAS_1MB (SMB_BIG_UINT)0x0000000000100000 +#define SMB_NTQUOTAS_1GB (SMB_BIG_UINT)0x0000000040000000 +#define SMB_NTQUOTAS_1TB (SMB_BIG_UINT)0x0000010000000000 +#define SMB_NTQUOTAS_1PB (SMB_BIG_UINT)0x0004000000000000 +#define SMB_NTQUOTAS_1EB (SMB_BIG_UINT)0x1000000000000000 + +enum SMB_QUOTA_TYPE { + SMB_INVALID_QUOTA_TYPE = -1, + SMB_USER_FS_QUOTA_TYPE = 1, + SMB_USER_QUOTA_TYPE = 2, + SMB_GROUP_FS_QUOTA_TYPE = 3,/* not used yet */ + SMB_GROUP_QUOTA_TYPE = 4 /* not in use yet, maybe for disk_free queries */ +}; + +typedef struct _SMB_NTQUOTA_STRUCT { + enum SMB_QUOTA_TYPE qtype; + SMB_BIG_UINT usedspace; + SMB_BIG_UINT softlim; + SMB_BIG_UINT hardlim; + enum SMB_QUOTA_TYPE qflags; + DOM_SID sid; +} SMB_NTQUOTA_STRUCT; + +typedef struct _SMB_NTQUOTA_LIST { + struct _SMB_NTQUOTA_LIST *prev,*next; + TALLOC_CTX *mem_ctx; + uid_t uid; + SMB_NTQUOTA_STRUCT *quotas; +} SMB_NTQUOTA_LIST; + +typedef struct _SMB_NTQUOTA_HANDLE { + BOOL valid; + SMB_NTQUOTA_LIST *quota_list; + SMB_NTQUOTA_LIST *tmp_list; +} SMB_NTQUOTA_HANDLE; + +#define CHECK_NTQUOTA_HANDLE_OK(fsp,conn) (FNUM_OK(fsp,conn) &&\ + (fsp)->fake_file_handle &&\ + ((fsp)->fake_file_handle->type == FAKE_FILE_TYPE_QUOTA) &&\ + (fsp)->fake_file_handle->pd) + +#endif /*_NTQUOTAS_H */ diff --git a/source3/include/rpc_echo.h b/source3/include/rpc_echo.h new file mode 100644 index 0000000000..8fa389cf56 --- /dev/null +++ b/source3/include/rpc_echo.h @@ -0,0 +1,74 @@ +/* + Unix SMB/CIFS implementation. + + Samba rpcecho definitions. + + Copyright (C) Tim Potter 2003 + + 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_ECHO_H +#define _RPC_ECHO_H + +#define ECHO_ADD_ONE 0x00 +#define ECHO_DATA 0x01 +#define ECHO_SINK_DATA 0x02 +#define ECHO_SOURCE_DATA 0x03 + +typedef struct echo_q_add_one +{ + uint32 request; +} ECHO_Q_ADD_ONE; + +typedef struct echo_r_add_one +{ + uint32 response; +} ECHO_R_ADD_ONE; + +typedef struct echo_q_echo_data +{ + uint32 size; + char *data; +} ECHO_Q_ECHO_DATA; + +typedef struct echo_r_echo_data +{ + uint32 size; + char *data; +} ECHO_R_ECHO_DATA; + +typedef struct echo_q_source_data +{ + uint32 size; +} ECHO_Q_SOURCE_DATA; + +typedef struct echo_r_source_data +{ + uint32 size; + char *data; +} ECHO_R_SOURCE_DATA; + +typedef struct echo_q_sink_data +{ + uint32 size; + char *data; +} ECHO_Q_SINK_DATA; + +typedef struct echo_r_sink_data +{ +} ECHO_R_SINK_DATA; + +#endif |