diff options
author | Luke Leighton <lkcl@samba.org> | 2000-04-03 08:52:41 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-04-03 08:52:41 +0000 |
commit | bf1eb182cd5fad4225b85cbf9c06e0c0250fd1b4 (patch) | |
tree | 327d9eb5aa5845b29b4d15c76ae418295fd62753 | |
parent | 2732517045cba2b7bd2c7b0cee20f14afab720a4 (diff) | |
download | samba-bf1eb182cd5fad4225b85cbf9c06e0c0250fd1b4.tar.gz samba-bf1eb182cd5fad4225b85cbf9c06e0c0250fd1b4.tar.xz samba-bf1eb182cd5fad4225b85cbf9c06e0c0250fd1b4.zip |
merge of cvs main headers.
-rw-r--r-- | source/include/includes.h | 138 | ||||
-rw-r--r-- | source/include/smb.h | 91 | ||||
-rw-r--r-- | source/include/trans2.h | 20 |
3 files changed, 152 insertions, 97 deletions
diff --git a/source/include/includes.h b/source/include/includes.h index f9b924be3b1..d50c9aa4133 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -45,15 +45,34 @@ #undef HAVE_TERMIOS_H #endif +#ifdef LINUX +#define DEFAULT_PRINTING PRINT_BSD +#define PRINTCAP_NAME "/etc/printcap" +#endif + +#ifdef RELIANTUNIX +/* + * <unistd.h> has to be included before any other to get + * large file support on Reliant UNIX + */ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#endif /* RELIANTUNIX */ -/* if we have both SYSV IPC and shared mmap then we need to - choose. For most systems it is much faster to use SYSV IPC. We used - to make an exception for Linux, but now Linux 2.2 has made it - better to use sysv if possible */ -#if (defined(HAVE_SYSV_IPC) && defined(HAVE_SHARED_MMAP)) -# undef HAVE_SHARED_MMAP +#ifdef HAVE_SYSV_IPC +#define USE_SYSV_IPC #endif +#ifdef HAVE_SHARED_MMAP +#define USE_SHARED_MMAP +#endif + + +/* if we have both SYSV IPC and shared mmap then we need to choose */ +#if (defined(USE_SYSV_IPC) && defined(USE_SHARED_MMAP)) +# undef USE_SHARED_MMAP +#endif #include <sys/types.h> @@ -94,11 +113,6 @@ #include <stdio.h> #include <stddef.h> -#include <netinet/in.h> -#if defined(HAVE_RPC_RPC_H) -#include <rpc/rpc.h> -#endif - #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif @@ -133,13 +147,9 @@ #include <memory.h> #endif -#ifdef MEM_MAN -#include "../mem_man/mem_man.h" -#else #ifdef HAVE_MALLOC_H #include <malloc.h> #endif -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> @@ -174,6 +184,9 @@ #ifdef HAVE_GRP_H #include <grp.h> #endif +#ifdef HAVE_SYS_PRIV_H +#include <sys/priv.h> +#endif #ifdef HAVE_SYS_ID_H #include <sys/id.h> #endif @@ -200,7 +213,6 @@ #endif #include <pwd.h> -#include <grp.h> #ifdef HAVE_STDARG_H #include <stdarg.h> @@ -208,6 +220,7 @@ #include <varargs.h> #endif +#include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <syslog.h> @@ -217,8 +230,32 @@ #include <netinet/tcp.h> #endif -#ifdef HAVE_TERMIOS_H +/* + * The next three defines are needed to access the IPTOS_* options + * on some systems. + */ + +#ifdef HAVE_NETINET_IN_SYSTM_H +#include <netinet/in_systm.h> +#endif + +#ifdef HAVE_NETINET_IN_IP_H +#include <netinet/in_ip.h> +#endif + +#ifdef HAVE_NETINET_IP_H +#include <netinet/ip.h> +#endif + +#if defined(HAVE_TERMIOS_H) +/* POSIX terminal handling. */ #include <termios.h> +#elif defined(HAVE_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include <termio.h> +#elif defined(HAVE_SYS_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include <sys/termio.h> #endif #if HAVE_DIRENT_H @@ -246,18 +283,24 @@ #include <sys/ipc.h> #include <sys/shm.h> #include <sys/sem.h> -#endif -#if 0 /* - * I have removed this as it prevents compilation under SCO Server - * 3.2. If you need to add it back in then please add a comment as to - * why it's needed and what OS it's needed for so we can work out how - * to test for it properly (tridge) */ -#ifdef HAVE_NET_ROUTE_H -#include <net/route.h> -#endif -#endif + * The following is needed if compiling + * with gcc on SGI IRIX 6.5.x systems as + * the structure packing for system calls is + * different between IRIX cc and gcc. + */ + +#ifdef NEED_SGI_SEMUN_HACK +union semun_hack { + int val; + struct semid_ds *buf; + unsigned short *array; + char __dummy[5]; +}; +#define semun semun_hack +#endif /* NEED_SGI_SEMUN_HACK */ +#endif /* HAVE_SYSV_IPC */ #ifdef HAVE_NET_IF_H #include <net/if.h> @@ -329,6 +372,12 @@ #endif #if defined(HAVE_RPC_RPC_H) +/* + * Check for AUTH_ERROR define conflict with rpc/rpc.h in prot.h. + */ +#if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT) +#undef AUTH_ERROR +#endif #include <rpc/rpc.h> #endif @@ -698,12 +747,15 @@ typedef struct smb_wpasswd { #endif /* this guess needs to be improved (tridge) */ -#if defined(STAT_STATVFS) && !defined(SYSV) +#if (defined(STAT_STATVFS) || defined(STAT_STATVFS64)) && !defined(SYSV) #define SYSV 1 #endif #ifndef DEFAULT_PRINTING -#ifdef SYSV +#ifdef HAVE_LIBCUPS +#define DEFAULT_PRINTING PRINT_CUPS +#define PRINTCAP_NAME "cups" +#elif defined(SYSV) #define DEFAULT_PRINTING PRINT_SYSV #define PRINTCAP_NAME "lpstat" #else @@ -771,10 +823,6 @@ union semun { #define MAXPATHLEN 256 #endif -#ifndef MAX_SERVER_POLICY_HANDLES -#define MAX_SERVER_POLICY_HANDLES 64 -#endif - #ifndef SEEK_SET #define SEEK_SET 0 #endif @@ -795,14 +843,6 @@ union semun { #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) #endif -#ifndef SHM_R -#define SHM_R (0400) -#endif - -#ifndef SHM_W -#define SHM_W (0200) -#endif - #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID) #define ULTRIX_AUTH 1 #endif @@ -823,14 +863,6 @@ union semun { # undef HAVE_LIBREADLINE # endif # endif - -/* Some old versions of readline don't define a prototype for - filename_completion_function() */ - -# ifndef HAVE_READLINE_FCF_PROTO -char *filename_completion_function(void); -# endif - #endif #ifndef HAVE_STRDUP @@ -857,6 +889,10 @@ time_t mktime(struct tm *t); int ftruncate(int f,long l); #endif +#ifndef HAVE_STRTOUL +unsigned long strtoul(const char *nptr, char **endptr, int base); +#endif + #if (defined(USE_SETRESUID) && !defined(HAVE_SETRESUID_DECL)) /* stupid glibc */ int setresuid(uid_t ruid, uid_t euid, uid_t suid); @@ -869,6 +905,10 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #define bzero(a,b) memset((a),'\0',(b)) #endif +#ifdef REPLACE_GETPASS +#define getpass(prompt) getsmbpass((prompt)) +#endif + /* * Some older systems seem not to have MAXHOSTNAMELEN * defined. diff --git a/source/include/smb.h b/source/include/smb.h index 412b8b97871..b69249d91a9 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -58,8 +58,7 @@ typedef int BOOL; #define SMB_SECONDARY_WAIT (60*1000) /* Debugging stuff */ - -#include <debug.h> +#include "debug.h" /* this defines the error codes that receive_smb can put in smb_read_error */ #define READ_TIMEOUT 1 @@ -164,6 +163,7 @@ implemented */ #define ERRbadshare 32 /* Share mode on file conflict with open mode */ #define ERRlock 33 /* Lock request conflicts with existing lock */ #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */ +#define ERRnosuchshare 67 /* You specified an invalid share name */ #define ERRfilexists 80 /* File in operation already exists */ #define ERRcannotopen 110 /* Cannot open the file specified */ #define ERRunknownlevel 124 @@ -174,11 +174,19 @@ implemented */ #define ERRnotconnected 233 /* No process on other end of named pipe */ #define ERRmoredata 234 /* More data to be returned */ #define ERRbaddirectory 267 /* Invalid directory name in a path. */ -#define ERROR_EAS_DIDNT_FIT 275 /* Extended attributes didn't fit */ -#define ERROR_EAS_NOT_SUPPORTED 282 /* Extended attributes not supported */ -#define ERROR_NOTIFY_ENUM_DIR 1022 /* Buffer too small to return change notify. */ #define ERRunknownipc 2142 +#define ERROR_ACCESS_DENIED (5) +#define ERROR_INVALID_PARAMETER (87) +#define ERROR_INSUFFICIENT_BUFFER (122) +#define ERROR_INVALID_NAME (123) +#define ERROR_INVALID_LEVEL (124) +#define ERROR_NO_MORE_ITEMS (259) +#define ERROR_EAS_DIDNT_FIT (275) /* Extended attributes didn't fit */ +#define ERROR_EAS_NOT_SUPPORTED (282) /* Extended attributes not supported */ +#define ERROR_NOTIFY_ENUM_DIR (1022) /* Buffer too small to return change notify. */ +#define ERROR_INVALID_PRINTER_NAME (1801) +#define ERROR_INVALID_DATATYPE (1804) /* here's a special one from observing NT */ #define ERRnoipc 66 /* don't support ipc */ @@ -282,7 +290,8 @@ typedef struct nttime_info uint32 low; uint32 high; -} NTTIME; +} +NTTIME; /* Allowable account control bits */ #define ACB_DISABLED 0x0001 /* 1 = User account disabled */ @@ -377,7 +386,8 @@ typedef struct sid_info */ uint32 sub_auths[MAXSUBAUTHS]; /* pointer to sub-authorities. */ -} DOM_SID; +} +DOM_SID; typedef struct group_name_info @@ -390,8 +400,7 @@ typedef struct group_name_info uint32 type; uint32 unix_id; -} -DOM_NAME_MAP; +} DOM_NAME_MAP; /* map either local aliases, domain groups or builtin aliases */ typedef enum @@ -412,8 +421,7 @@ typedef struct local_grp_member_info uint8 sid_use; /* usr=1 grp=2 dom=3 alias=4 wkng=5 del=6 inv=7 unk=8 */ fstring name; /* matches with sid: must be of the form "DOMAIN\account" */ -} -LOCAL_GRP_MEMBER; +} LOCAL_GRP_MEMBER; /* enumerate these to get list of local groups */ @@ -424,8 +432,7 @@ typedef struct local_grp_info fstring comment; uint32 rid; /* alias rid */ -} -LOCAL_GRP; +} LOCAL_GRP; /*** query a domain group, get a list of these: shows who is in that group ***/ @@ -437,8 +444,7 @@ typedef struct domain_grp_member_info uint32 rid; /* rid of domain group member */ uint8 sid_use; /* usr=1 grp=2 dom=3 alias=4 wkng=5 del=6 inv=7 unk=8 */ -} -DOMAIN_GRP_MEMBER; +} DOMAIN_GRP_MEMBER; /*** enumerate these to get list of domain groups ***/ @@ -450,8 +456,7 @@ typedef struct domain_grp_info uint32 rid; /* group rid */ uint8 attr; /* attributes forced to be set to 0x7: SE_GROUP_xxx */ -} -DOMAIN_GRP; +} DOMAIN_GRP; /* DOM_CHAL - challenge info */ typedef struct chal_info @@ -464,7 +469,8 @@ DOM_CHAL; typedef struct time_info { uint32 time; -} UTIME; +} +UTIME; /* DOM_CREDs - timestamped client or server credentials */ typedef struct cred_info @@ -483,8 +489,7 @@ typedef struct int32 wr_error; /* Cached errors */ BOOL wr_mode; /* write through mode) */ BOOL wr_discard; /* discard all further data */ -} -write_bmpx_struct; +} write_bmpx_struct; typedef struct write_cache { @@ -493,8 +498,7 @@ typedef struct write_cache size_t alloc_size; size_t data_size; char *data; -} -write_cache; +} write_cache; /* * Structure used to indirect fd's from the files_struct. @@ -515,8 +519,7 @@ typedef struct file_fd_struct int fd_writeonly; int real_open_flags; BOOL delete_on_close; -} -file_fd_struct; +} file_fd_struct; typedef struct files_struct { @@ -545,8 +548,7 @@ typedef struct files_struct BOOL directory_delete_on_close; BOOL stat_open; char *fsp_name; -} -files_struct; +} files_struct; /* * Structure used to keep directory state information around. @@ -570,8 +572,7 @@ typedef struct { char *name; BOOL is_wild; -} -name_compare_entry; +} name_compare_entry; /* Include VFS stuff */ @@ -600,7 +601,7 @@ typedef struct connection_struct char *connectpath; char *origpath; struct vfs_ops vfs_ops; /* Filesystem operations */ - struct vfs_connection_struct *vfs_conn; + struct vfs_connection_struct *vfs_conn; /* VFS specific connection stuff */ char *user; /* name of user who *opened* this connection */ @@ -625,8 +626,7 @@ typedef struct connection_struct name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */ name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */ -} -connection_struct; +} connection_struct; /* Domain controller authentication protocol info */ struct dcinfo @@ -644,7 +644,7 @@ struct dcinfo enum { LPQ_QUEUED, LPQ_PAUSED, LPQ_SPOOLING, LPQ_PRINTING }; -typedef struct +typedef struct _print_queue_struct { int job; int size; @@ -653,8 +653,7 @@ typedef struct time_t time; char user[30]; char file[100]; -} -print_queue_struct; +} print_queue_struct; enum { LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR }; @@ -663,8 +662,7 @@ typedef struct { fstring message; int status; -} -print_status_struct; +} print_status_struct; /* used for server information: client, nameserv and ipc */ struct server_info_struct @@ -689,7 +687,7 @@ struct interface /* struct returned by get_share_modes */ typedef struct { - int pid; + pid_t pid; uint16 op_port; uint16 op_type; int share_mode; @@ -1025,7 +1023,7 @@ struct locking_data typedef enum { P_BOOL, P_BOOLREV, P_CHAR, P_INTEGER, P_OCTAL, - P_STRING, P_USTRING, P_GSTRING, P_UGSTRING, P_ENUM, P_PTR, P_SEP + P_STRING, P_USTRING, P_GSTRING, P_UGSTRING, P_ENUM, P_SEP } parm_type; @@ -1069,8 +1067,7 @@ struct parm_struct int ivalue; char *svalue; char cvalue; - } - def; + } def; }; struct bitmap @@ -1628,7 +1625,7 @@ char *strdup(char *s); #define FLAGS2_32_BIT_ERROR_CODES 0x4000 #define FLAGS2_UNICODE_STRINGS 0x8000 -#define FLAGS2_WIN2K_SIGNATURE 0xC852 /* Hack alert ! For now... JRA. */ +#define FLAGS2_WIN2K_SIGNATURE 0xC852 /* Hack alert ! For now... JRA. */ /* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */ @@ -1855,7 +1852,8 @@ typedef struct uint32 pid; uint16 vuid; -} vuser_key; +} +vuser_key; struct use_info { @@ -1885,8 +1883,7 @@ typedef struct NET_USER_INFO_3 usr; -} -user_struct; +} user_struct; struct current_user { @@ -2006,8 +2003,7 @@ typedef struct subst_creds fstring myhostname; fstring remote_machine; -} -CREDS_SUBST; +} CREDS_SUBST; #include "rpc_creds.h" @@ -2058,8 +2054,7 @@ typedef struct netsec_creds uchar sess_key[16]; /* NETLOGON session key */ -} -netsec_creds; +} netsec_creds; struct policy; struct bitmap; diff --git a/source/include/trans2.h b/source/include/trans2.h index 634244a1932..bbe796b7425 100644 --- a/source/include/trans2.h +++ b/source/include/trans2.h @@ -239,6 +239,26 @@ Byte offset Type name description #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) +/* + * DeviceType and Characteristics returned in a + * SMB_QUERY_FS_DEVICE_INFO call. + */ + +#define DEVICETYPE_CD_ROM 0x2 +#define DEVICETYPE_CD_ROM_FILE_SYSTEM 0x3 +#define DEVICETYPE_DISK 0x7 +#define DEVICETYPE_DISK_FILE_SYSTEM 0x8 +#define DEVICETYPE_FILE_SYSTEM 0x9 + +/* Characteristics. */ +#define TYPE_REMOVABLE_MEDIA 0x1 +#define TYPE_READ_ONLY_DEVICE 0x2 +#define TYPE_FLOPPY 0x4 +#define TYPE_WORM 0x8 +#define TYPE_REMOTE 0x10 +#define TYPE_MOUNTED 0x20 +#define TYPE_VIRTUAL 0x40 + #endif |