Changeset 745 for trunk/server/source3/include/smb.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
source3/include/smb.h (modified) (48 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/smb.h
r480 r745 28 28 29 29 /* logged when starting the various Samba daemons */ 30 #define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-201 0"30 #define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-201" 31 31 32 32 … … 68 68 /* how long to wait for secondary SMB packets (milli-seconds) */ 69 69 #define SMB_SECONDARY_WAIT (60*1000) 70 71 /* Debugging stuff */72 #include "debug.h"73 70 74 71 /* this defines the error codes that receive_smb can put in smb_read_error */ … … 87 84 #define DIR_STRUCT_SIZE 43 88 85 89 /* these define the attribute byte as seen by DOS */90 #define aRONLY (1L<<0) /* 0x01 */91 #define aHIDDEN (1L<<1) /* 0x02 */92 #define aSYSTEM (1L<<2) /* 0x04 */93 #define aVOLID (1L<<3) /* 0x08 */94 #define aDIR (1L<<4) /* 0x10 */95 #define aARCH (1L<<5) /* 0x20 */96 97 86 /* deny modes */ 98 87 #define DENY_DOS 0 … … 138 127 #define OPENX_FILE_FAIL_IF_NOT_EXIST 0 139 128 140 #include "../libcli/util/doserr.h"141 142 129 typedef union unid_t { 143 130 uid_t uid; … … 145 132 } unid_t; 146 133 147 /*148 * SMB UCS2 (16-bit unicode) internal type.149 * smb_ucs2_t is *always* in little endian format.150 */151 152 #ifdef WORDS_BIGENDIAN153 #define UCS2_SHIFT 8154 #else155 #define UCS2_SHIFT 0156 #endif157 158 /* turn a 7 bit character into a ucs2 character */159 #define UCS2_CHAR(c) ((c) << UCS2_SHIFT)160 161 /* return an ascii version of a ucs2 character */162 #define UCS2_TO_CHAR(c) (((c) >> UCS2_SHIFT) & 0xff)163 164 /* Copy into a smb_ucs2_t from a possibly unaligned buffer. Return the copied smb_ucs2_t */165 #define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\166 ((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest))167 168 134 /* pipe string names */ 169 #define PIPE_LANMAN "\\PIPE\\LANMAN"170 171 #define MAX_HOURS_LEN 32172 135 173 136 #ifndef MAXSUBAUTHS … … 177 140 #define SID_MAX_SIZE ((size_t)(8+(MAXSUBAUTHS*4))) 178 141 179 #define LOOKUP_NAME_NONE 0x00000000180 #define LOOKUP_NAME_ISOLATED 0x00000001 /* Look up unqualified names */181 #define LOOKUP_NAME_REMOTE 0x00000002 /* Ask others */182 #define LOOKUP_NAME_GROUP 0x00000004 /* (unused) This is a NASTY hack for183 valid users = @foo where foo also184 exists in as user. */185 #define LOOKUP_NAME_NO_NSS 0x00000008 /* no NSS calls to avoid186 winbind recursions */187 #define LOOKUP_NAME_BUILTIN 0x00000010 /* builtin names */188 #define LOOKUP_NAME_WKN 0x00000020 /* well known names */189 #define LOOKUP_NAME_DOMAIN 0x00000040 /* only lookup own domain */190 #define LOOKUP_NAME_LOCAL (LOOKUP_NAME_ISOLATED\191 |LOOKUP_NAME_BUILTIN\192 |LOOKUP_NAME_WKN\193 |LOOKUP_NAME_DOMAIN)194 #define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED\195 |LOOKUP_NAME_REMOTE\196 |LOOKUP_NAME_BUILTIN\197 |LOOKUP_NAME_WKN\198 |LOOKUP_NAME_DOMAIN)199 200 /**201 * @brief Security Identifier202 *203 * @sa http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/accctrl_38yn.asp204 **/205 typedef struct dom_sid DOM_SID;206 207 enum id_mapping {208 ID_UNKNOWN = 0,209 ID_MAPPED,210 ID_UNMAPPED,211 ID_EXPIRED212 };213 214 enum id_type {215 ID_TYPE_NOT_SPECIFIED = 0,216 ID_TYPE_UID,217 ID_TYPE_GID218 };219 220 struct unixid {221 uint32_t id;222 enum id_type type;223 };224 225 struct id_map {226 DOM_SID *sid;227 struct unixid xid;228 enum id_mapping status;229 };230 231 #include "librpc/gen_ndr/misc.h"232 142 #include "librpc/gen_ndr/security.h" 233 #include "librpc/ndr/libndr.h"234 #include "librpc/gen_ndr/lsa.h"235 #include "librpc/gen_ndr/dfs.h"236 #include "librpc/gen_ndr/winreg.h"237 #include "librpc/gen_ndr/initshutdown.h"238 #include "librpc/gen_ndr/eventlog.h"239 #include "librpc/gen_ndr/srvsvc.h"240 #include "librpc/gen_ndr/wkssvc.h"241 #include "librpc/gen_ndr/echo.h"242 #include "librpc/gen_ndr/svcctl.h"243 #include "librpc/gen_ndr/netlogon.h"244 #include "librpc/gen_ndr/samr.h"245 #include "librpc/gen_ndr/dssetup.h"246 #include "librpc/gen_ndr/epmapper.h"247 #include "librpc/gen_ndr/libnet_join.h"248 #include "librpc/gen_ndr/krb5pac.h"249 #include "librpc/gen_ndr/ntsvcs.h"250 #include "librpc/gen_ndr/nbt.h"251 #include "librpc/gen_ndr/drsuapi.h"252 #include "librpc/gen_ndr/drsblobs.h"253 #include "librpc/gen_ndr/spoolss.h"254 #include "librpc/gen_ndr/dcerpc.h"255 #include "librpc/gen_ndr/ndr_dcerpc.h"256 #include "librpc/gen_ndr/ntlmssp.h"257 258 struct lsa_dom_info {259 bool valid;260 DOM_SID sid;261 const char *name;262 int num_idxs;263 int *idxs;264 };265 266 struct lsa_name_info {267 uint32 rid;268 enum lsa_SidType type;269 const char *name;270 int dom_idx;271 };272 273 /* Some well-known SIDs */274 extern const DOM_SID global_sid_World_Domain;275 extern const DOM_SID global_sid_World;276 extern const DOM_SID global_sid_Creator_Owner_Domain;277 extern const DOM_SID global_sid_NT_Authority;278 extern const DOM_SID global_sid_System;279 extern const DOM_SID global_sid_NULL;280 extern const DOM_SID global_sid_Authenticated_Users;281 extern const DOM_SID global_sid_Network;282 extern const DOM_SID global_sid_Creator_Owner;283 extern const DOM_SID global_sid_Creator_Group;284 extern const DOM_SID global_sid_Anonymous;285 extern const DOM_SID global_sid_Builtin;286 extern const DOM_SID global_sid_Builtin_Administrators;287 extern const DOM_SID global_sid_Builtin_Users;288 extern const DOM_SID global_sid_Builtin_Guests;289 extern const DOM_SID global_sid_Builtin_Power_Users;290 extern const DOM_SID global_sid_Builtin_Account_Operators;291 extern const DOM_SID global_sid_Builtin_Server_Operators;292 extern const DOM_SID global_sid_Builtin_Print_Operators;293 extern const DOM_SID global_sid_Builtin_Backup_Operators;294 extern const DOM_SID global_sid_Builtin_Replicator;295 extern const DOM_SID global_sid_Builtin_PreWin2kAccess;296 extern const DOM_SID global_sid_Unix_Users;297 extern const DOM_SID global_sid_Unix_Groups;298 143 299 144 /* … … 310 155 #define PRIMARY_GROUP_SID_INDEX 1 311 156 312 typedef struct nt_user_token {313 size_t num_sids;314 DOM_SID *user_sids;315 SE_PRIV privileges;316 } NT_USER_TOKEN;317 318 typedef struct unix_user_token {319 uid_t uid;320 gid_t gid;321 size_t ngroups;322 gid_t *groups;323 } UNIX_USER_TOKEN;324 325 /* 32 bit time (sec) since 01jan1970 - cifs6.txt, section 3.5, page 30 */326 typedef struct time_info {327 uint32 time;328 } UTIME;329 330 157 typedef struct write_cache { 331 158 SMB_OFF_T file_size; … … 336 163 } write_cache; 337 164 338 #include "fake_file.h"339 340 165 struct fd_handle { 341 166 size_t ref_count; … … 345 170 uint32 private_options; /* NT Create options, but we only look at 346 171 * NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and 347 * NTCREATEX_OPTIONS_PRIVATE_DENY_FCB (Except 172 * NTCREATEX_OPTIONS_PRIVATE_DENY_FCB and 173 * NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE 348 174 * for print files *only*, where 349 175 * DELETE_ON_CLOSE is not stored in the share … … 357 183 struct uuid; 358 184 struct named_mutex; 359 struct pcap_cache;360 185 struct wb_context; 361 186 struct rpc_cli_smbd_conn; … … 411 236 }; 412 237 238 239 240 241 242 243 244 245 246 413 247 typedef struct files_struct { 414 248 struct files_struct *next, *prev; … … 417 251 struct fd_handle *fh; 418 252 unsigned int num_smb_operations; 419 uint16 rap_print_jobid;420 253 struct file_id file_id; 421 254 uint64_t initial_allocation_size; /* Faked up initial allocation on disk. */ … … 446 279 bool can_read; 447 280 bool can_write; 448 bool print_file;449 281 bool modified; 450 282 bool is_directory; … … 454 286 bool delete_on_close; 455 287 bool posix_open; 288 456 289 struct smb_filename *fsp_name; 290 457 291 458 292 struct vfs_fsp_data *vfs_extension; … … 472 306 473 307 struct dptr_struct *dptr; 308 309 310 311 474 312 } files_struct; 475 313 … … 477 315 #include "sysquotas.h" 478 316 317 318 319 320 321 479 322 struct vuid_cache_entry { 480 struct auth_serversupplied_info *se rver_info;323 struct auth_serversupplied_info *se_info; 481 324 uint16_t vuid; 482 325 bool read_only; 483 bool admin_user;484 326 }; 485 327 … … 497 339 struct trans_state *next, *prev; 498 340 uint16 vuid; 499 uint 16mid;341 uint mid; 500 342 501 343 uint32 max_param_return; … … 567 409 bool ipc; 568 410 bool read_only; /* Attributes for the current user of the share. */ 569 bool admin_user; /* Attributes for the current user of the share. */411 570 412 /* Does this filesystem honor 571 413 sub second timestamps on files … … 581 423 * on the vuid using this tid, this might change per SMB request. 582 424 */ 583 struct auth_serversupplied_info *se rver_info;425 struct auth_serversupplied_info *se_info; 584 426 585 427 /* … … 588 430 */ 589 431 gid_t force_group_gid; 590 591 char client_address[INET6_ADDRSTRLEN]; /* String version of client IP address. */592 432 593 433 uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */ … … 619 459 struct trans_state *pending_trans; 620 460 struct notify_context *notify_ctx; 461 462 463 621 464 } connection_struct; 622 465 … … 624 467 connection_struct *conn; 625 468 uint16 vuid; 626 UNIX_USER_TOKEN ut; 627 NT_USER_TOKEN *nt_user_token; 628 }; 629 469 struct security_unix_token ut; 470 struct security_token *nt_user_token; 471 }; 472 473 struct smbd_smb2_request; 630 474 631 475 struct smb_request { … … 633 477 uint16 flags2; 634 478 uint16 smbpid; 635 uint 16 mid;479 uint 636 480 uint32_t seqnum; 637 481 uint16 vuid; … … 657 501 bool encrypted; 658 502 connection_struct *conn; 503 659 504 struct smb_perfcount_data pcd; 660 505 … … 675 520 676 521 bool done; 522 523 524 525 526 677 527 }; 678 528 … … 687 537 fstring domain; /* domain that the client specified */ 688 538 } userdom_struct; 689 690 /* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */691 692 enum {LPQ_QUEUED=0,LPQ_PAUSED,LPQ_SPOOLING,LPQ_PRINTING,LPQ_ERROR,LPQ_DELETING,693 LPQ_OFFLINE,LPQ_PAPEROUT,LPQ_PRINTED,LPQ_DELETED,LPQ_BLOCKED,LPQ_USER_INTERVENTION};694 695 typedef struct _print_queue_struct {696 int job; /* normally the UNIX jobid -- see note in697 printing.c:traverse_fn_delete() */698 int size;699 int page_count;700 int status;701 int priority;702 time_t time;703 fstring fs_user;704 fstring fs_file;705 } print_queue_struct;706 707 enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR};708 709 typedef struct {710 fstring message;711 int qcount;712 int status;713 } print_status_struct;714 539 715 540 /* used for server information: client, nameserv and ipc */ … … 747 572 #define SHARE_MODE_FLAG_POSIX_OPEN 0x1 748 573 574 575 749 576 /* struct returned by get_share_modes */ 750 577 struct share_mode_entry { 751 578 struct server_id pid; 752 uint 16 op_mid;579 uint 753 580 uint16 op_type; 754 581 uint32 access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */ … … 763 590 uint32 uid; /* uid of file opener. */ 764 591 uint16 flags; /* See SHARE_MODE_XX above. */ 592 765 593 }; 766 594 … … 769 597 Offset Data length. 770 598 0 struct server_id pid 4 771 4 uint16 op_mid 2 772 6 uint16 op_type 2 773 8 uint32 access_mask 4 774 12 uint32 share_access 4 775 16 uint32 private_options 4 776 20 uint32 time sec 4 777 24 uint32 time usec 4 778 28 uint64 dev 8 bytes 779 36 uint64 inode 8 bytes 780 44 uint64 extid 8 bytes 781 52 unsigned long file_id 4 bytes 782 56 uint32 uid 4 bytes 783 60 uint16 flags 2 bytes 784 62 599 4 uint16 op_mid 8 600 12 uint16 op_type 2 601 14 uint32 access_mask 4 602 18 uint32 share_access 4 603 22 uint32 private_options 4 604 26 uint32 time sec 4 605 30 uint32 time usec 4 606 34 uint64 dev 8 bytes 607 42 uint64 inode 8 bytes 608 50 uint64 extid 8 bytes 609 58 unsigned long file_id 4 bytes 610 62 uint32 uid 4 bytes 611 66 uint16 flags 2 bytes 612 68 uint32 name_hash 4 bytes 613 72 785 614 786 615 */ 787 #ifdef CLUSTER_SUPPORT 788 #define MSG_SMB_SHARE_MODE_ENTRY_SIZE 66 789 #else 790 #define MSG_SMB_SHARE_MODE_ENTRY_SIZE 62 791 #endif 616 617 #define OP_BREAK_MSG_PID_OFFSET 0 618 #define OP_BREAK_MSG_MID_OFFSET 4 619 #define OP_BREAK_MSG_OP_TYPE_OFFSET 12 620 #define OP_BREAK_MSG_ACCESS_MASK_OFFSET 14 621 #define OP_BREAK_MSG_SHARE_ACCESS_OFFSET 18 622 #define OP_BREAK_MSG_PRIV_OFFSET 22 623 #define OP_BREAK_MSG_TIME_SEC_OFFSET 26 624 #define OP_BREAK_MSG_TIME_USEC_OFFSET 30 625 #define OP_BREAK_MSG_DEV_OFFSET 34 626 #define OP_BREAK_MSG_INO_OFFSET 42 627 #define OP_BREAK_MSG_EXTID_OFFSET 50 628 #define OP_BREAK_MSG_FILE_ID_OFFSET 58 629 #define OP_BREAK_MSG_UID_OFFSET 62 630 #define OP_BREAK_MSG_FLAGS_OFFSET 66 631 #define OP_BREAK_MSG_NAME_HASH_OFFSET 68 632 633 #define OP_BREAK_MSG_VNN_OFFSET 72 634 #define MSG_SMB_SHARE_MODE_ENTRY_SIZE 76 635 636 struct delete_token_list { 637 struct delete_token_list *next, *prev; 638 uint32_t name_hash; 639 struct security_unix_token *delete_token; 640 }; 792 641 793 642 struct share_mode_lock { … … 798 647 int num_share_modes; 799 648 struct share_mode_entry *share_modes; 800 UNIX_USER_TOKEN *delete_token; 801 bool delete_on_close; 649 struct delete_token_list *delete_tokens; 802 650 struct timespec old_write_time; 803 651 struct timespec changed_write_time; … … 816 664 struct { 817 665 int num_share_mode_entries; 818 bool delete_on_close;819 666 struct timespec old_write_time; 820 667 struct timespec changed_write_time; 821 uint32 delete_token_size; /* Only valid if either of 822 the two previous fields 823 are True. */ 668 uint32 num_delete_token_entries; 824 669 } s; 825 670 struct share_mode_entry dummy; /* Needed for alignment. */ 826 671 } u; 827 672 /* The following four entries are implicit 828 struct share_mode_entry modes[num_share_mode_entries]; 829 char unix_token[delete_token_size] (divisible by 4). 830 char share_name[]; 831 char file_name[]; 673 674 (1) struct share_mode_entry modes[num_share_mode_entries]; 675 676 (2) A num_delete_token_entries of structs { 677 uint32_t len_delete_token; 678 char unix_token[len_delete_token] (divisible by 4). 679 }; 680 681 (3) char share_name[]; 682 (4) char file_name[]; 832 683 */ 833 684 }; 834 835 /* Used to store pipe open records for NetFileEnum() */836 837 struct pipe_open_rec {838 struct server_id pid;839 uid_t uid;840 int pnum;841 fstring name;842 };843 844 685 845 686 #define NT_HASH_LEN 16 846 687 #define LM_HASH_LEN 16 847 848 /* Password history contants. */849 #define PW_HISTORY_SALT_LEN 16850 #define SALTED_MD5_HASH_LEN 16851 #define PW_HISTORY_ENTRY_LEN (PW_HISTORY_SALT_LEN+SALTED_MD5_HASH_LEN)852 #define MAX_PW_HISTORY_LEN 24853 854 /*855 * Flags for local user manipulation.856 */857 858 #define LOCAL_ADD_USER 0x1859 #define LOCAL_DELETE_USER 0x2860 #define LOCAL_DISABLE_USER 0x4861 #define LOCAL_ENABLE_USER 0x8862 #define LOCAL_TRUST_ACCOUNT 0x10863 #define LOCAL_SET_NO_PASSWORD 0x20864 #define LOCAL_SET_PASSWORD 0x40865 #define LOCAL_SET_LDAP_ADMIN_PW 0x80866 #define LOCAL_INTERDOM_ACCOUNT 0x100867 #define LOCAL_AM_ROOT 0x200 /* Act as root */868 688 869 689 /* key and data in the connections database - used in smbstatus and smbd */ … … 884 704 char machine[FSTRING_LEN]; 885 705 time_t start; 886 uint32 bcast_msg_flags; 706 707 /* 708 * This field used to hold the msg_flags. For compatibility reasons, 709 * keep the data structure in the tdb file the same. 710 */ 711 uint32 unused_compatitibility_field; 887 712 }; 888 713 … … 932 757 #define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when reading this string. */ 933 758 #define FLAG_META 0x8000 /* A meta directive - not a real parameter */ 759 934 760 935 761 struct bitmap { … … 1206 1032 #define PIPE_START_MESSAGE 0x8 1207 1033 1208 /* File Specific access rights */1209 #define FILE_READ_DATA 0x000000011210 #define FILE_WRITE_DATA 0x000000021211 #define FILE_APPEND_DATA 0x000000041212 #define FILE_READ_EA 0x00000008 /* File and directory */1213 #define FILE_WRITE_EA 0x00000010 /* File and directory */1214 #define FILE_EXECUTE 0x000000201215 #define FILE_DELETE_CHILD 0x000000401216 #define FILE_READ_ATTRIBUTES 0x000000801217 #define FILE_WRITE_ATTRIBUTES 0x000001001218 1219 #define FILE_ALL_ACCESS 0x000001FF1220 1221 /* Directory specific access rights */1222 #define FILE_LIST_DIRECTORY 0x000000011223 #define FILE_ADD_FILE 0x000000021224 #define FILE_ADD_SUBDIRECTORY 0x000000041225 #define FILE_TRAVERSE 0x000000201226 #define FILE_DELETE_CHILD 0x000000401227 1228 1034 /* the desired access to use when opening a pipe */ 1229 1035 #define DESIRED_ACCESS_PIPE 0x2019f 1230 1036 1231 /* Generic access masks & rights. */1232 #define DELETE_ACCESS 0x00010000 /* (1L<<16) */1233 #define READ_CONTROL_ACCESS 0x00020000 /* (1L<<17) */1234 #define WRITE_DAC_ACCESS 0x00040000 /* (1L<<18) */1235 #define WRITE_OWNER_ACCESS 0x00080000 /* (1L<<19) */1236 #define SYNCHRONIZE_ACCESS 0x00100000 /* (1L<<20) */1237 1238 #define SYSTEM_SECURITY_ACCESS 0x01000000 /* (1L<<24) */1239 #define MAXIMUM_ALLOWED_ACCESS 0x02000000 /* (1L<<25) */1240 #define GENERIC_ALL_ACCESS 0x10000000 /* (1<<28) */1241 #define GENERIC_EXECUTE_ACCESS 0x20000000 /* (1<<29) */1242 #define GENERIC_WRITE_ACCESS 0x40000000 /* (1<<30) */1243 #define GENERIC_READ_ACCESS ((unsigned)0x80000000) /* (((unsigned)1)<<31) */1244 1245 /* Mapping of generic access rights for files to specific rights. */1246 1247 /* This maps to 0x1F01FF */1248 #define FILE_GENERIC_ALL (STANDARD_RIGHTS_REQUIRED_ACCESS|\1249 SYNCHRONIZE_ACCESS|\1250 FILE_ALL_ACCESS)1251 1252 /* This maps to 0x120089 */1253 #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ_ACCESS|\1254 FILE_READ_DATA|\1255 FILE_READ_ATTRIBUTES|\1256 FILE_READ_EA|\1257 SYNCHRONIZE_ACCESS)1258 1259 /* This maps to 0x120116 */1260 #define FILE_GENERIC_WRITE (STD_RIGHT_READ_CONTROL_ACCESS|\1261 FILE_WRITE_DATA|\1262 FILE_WRITE_ATTRIBUTES|\1263 FILE_WRITE_EA|\1264 FILE_APPEND_DATA|\1265 SYNCHRONIZE_ACCESS)1266 1267 #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE_ACCESS|\1268 FILE_READ_ATTRIBUTES|\1269 FILE_EXECUTE|\1270 SYNCHRONIZE_ACCESS)1271 1272 /* Share specific rights. */1273 #define SHARE_ALL_ACCESS FILE_GENERIC_ALL1274 #define SHARE_READ_ONLY (FILE_GENERIC_READ|FILE_EXECUTE)1275 1276 1037 /* Mapping of access rights to UNIX perms. */ 1277 1038 #define UNIX_ACCESS_RWX FILE_GENERIC_ALL … … 1319 1080 #define FILE_ATTRIBUTE_HIDDEN 0x002L 1320 1081 #define FILE_ATTRIBUTE_SYSTEM 0x004L 1082 1321 1083 #define FILE_ATTRIBUTE_DIRECTORY 0x010L 1322 1084 #define FILE_ATTRIBUTE_ARCHIVE 0x020L … … 1329 1091 #define FILE_ATTRIBUTE_NONINDEXED 0x2000L 1330 1092 #define FILE_ATTRIBUTE_ENCRYPTED 0x4000L 1331 #define SAMBA_ATTRIBUTES_MASK 0x7F 1093 #define SAMBA_ATTRIBUTES_MASK (FILE_ATTRIBUTE_READONLY|\ 1094 FILE_ATTRIBUTE_HIDDEN|\ 1095 FILE_ATTRIBUTE_SYSTEM|\ 1096 FILE_ATTRIBUTE_DIRECTORY|\ 1097 FILE_ATTRIBUTE_ARCHIVE) 1332 1098 1333 1099 /* Flags - combined with attributes. */ … … 1376 1142 /* 1377 1143 * Private create options used by the ntcreatex processing code. From Samba4. 1378 * We reuse some ignored flags for private use. 1379 */ 1380 #define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS 0x00010000 1381 #define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB 0x00020000 1144 * We reuse some ignored flags for private use. Passed in the private_flags 1145 * argument. 1146 */ 1147 #define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS 0x0001 1148 #define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB 0x0002 1382 1149 1383 1150 /* Private options for streams support */ 1384 #define NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE 0x00040000 1151 #define NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE 0x0004 1152 1153 /* Private options for printer support */ 1154 #define NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE 0x0008 1385 1155 1386 1156 /* Responses when opening a file. */ … … 1473 1243 #endif 1474 1244 1475 #ifndef SIGNAL_CAST1476 #define SIGNAL_CAST (RETSIGTYPE (*)(int))1477 #endif1478 1479 1245 #ifndef SELECT_CAST 1480 1246 #define SELECT_CAST … … 1585 1351 }; 1586 1352 1587 /* LDAP schema types */1588 enum schema_types {SCHEMA_COMPAT, SCHEMA_AD, SCHEMA_SAMBA};1589 1590 1353 /* LDAP SSL options */ 1591 1354 enum ldap_ssl_types {LDAP_SSL_OFF, LDAP_SSL_START_TLS}; … … 1593 1356 /* LDAP PASSWD SYNC methods */ 1594 1357 enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY}; 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1595 1370 1596 1371 /* Remote architectures we know about. */ 1597 1372 enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, 1598 1373 RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA, 1599 RA_SAMBA, RA_CIFSFS, RA_WINXP64 };1374 RA_SAMBA, RA_CIFSFS, RA_WINXP64}; 1600 1375 1601 1376 /* case handling */ … … 1792 1567 1793 1568 /* A netbios node status array element. */ 1794 typedef struct node_status_{1569 { 1795 1570 nstring name; 1796 1571 unsigned char type; 1797 1572 unsigned char flags; 1798 } NODE_STATUS_STRUCT;1573 }; 1799 1574 1800 1575 /* The extra info from a NetBIOS node status query */ … … 1812 1587 int homes_snum; 1813 1588 1814 struct auth_serversupplied_info *se rver_info;1589 struct auth_serversupplied_info *se_info; 1815 1590 1816 1591 struct auth_ntlmssp_state *auth_ntlmssp_state; … … 1825 1600 1826 1601 /* 1827 * Size of new password account encoding string. This is enough space to1828 * hold 11 ACB characters, plus the surrounding [] and a terminating null.1829 * Do not change unless you are adding new ACB bits!1830 */1831 1832 #define NEW_PW_FORMAT_SPACE_PADDED_LEN 141833 1834 /*1835 1602 Do you want session setups at user level security with a invalid 1836 1603 password to be rejected or allowed in as guest? WinNT rejects them … … 1865 1632 1866 1633 #define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14 1867 1868 #include "popt_common.h"1869 1634 1870 1635 #define PORT_NONE 0 … … 1879 1644 unsigned port; 1880 1645 }; 1881 1882 /* Special name type used to cause a _kerberos DNS lookup. */1883 #define KDC_NAME_TYPE 0xDCDC1884 1646 1885 1647 struct ea_struct { … … 1902 1664 /* Prefix for xattrs storing streams. */ 1903 1665 #define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS" 1904 1905 #define UUID_SIZE 161906 1907 #define UUID_FLAT_SIZE 161908 typedef struct uuid_flat {1909 uint8 info[UUID_FLAT_SIZE];1910 } UUID_FLAT;1911 1666 1912 1667 /* map readonly options */ … … 1926 1681 USERSHARE_PATH_NOT_ALLOWED, 1927 1682 USERSHARE_PATH_NOT_DIRECTORY, 1928 USERSHARE_POSIX_ERR 1683 USERSHARE_POSIX_ERR, 1684 USERSHARE_MALFORMED_SHARENAME_DEF, 1685 USERSHARE_BAD_SHARENAME 1929 1686 }; 1930 1687 … … 1975 1732 }; 1976 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1977 1762 #endif /* _SMB_H */
Note:
See TracChangeset
for help on using the changeset viewer.
