diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-25 23:40:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-25 23:40:49 +0000 |
commit | 5f7ee360567a6b4e1a6f43ff01da057d2998fef8 (patch) | |
tree | b8528e7d3bc30fc7b2ab191bc9235be604daf98e /source3/include | |
parent | 14f9495e4c5ff98cd15bf18d7fbc63c1b491cfea (diff) | |
download | samba-5f7ee360567a6b4e1a6f43ff01da057d2998fef8.tar.gz samba-5f7ee360567a6b4e1a6f43ff01da057d2998fef8.tar.bz2 samba-5f7ee360567a6b4e1a6f43ff01da057d2998fef8.zip |
Makefile.in: Fixed bug with continuation line causing proto to fail.
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
Added function checks for srandom random srand rand.
Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
Moved enum action_type into rpcclient.h
Moved struct cli_state into client.h
Moved struct nt_client_info, struct tar_client_info, struct client_info
into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.
Jeremy.
(This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/config.h.in | 16 | ||||
-rw-r--r-- | source3/include/includes.h | 4 | ||||
-rw-r--r-- | source3/include/ntdomain.h | 6 | ||||
-rw-r--r-- | source3/include/proto.h | 4 | ||||
-rw-r--r-- | source3/include/smb.h | 156 |
5 files changed, 38 insertions, 148 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 4f199f0df3..e0b62031c5 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -123,6 +123,7 @@ #undef STAT_STATVFS64 #undef HAVE_LIBREADLINE #undef HAVE_KERNEL_OPLOCKS +#undef HAVE_IRIX_SPECIFIC_CAPABILITIES /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -247,6 +248,12 @@ /* Define if you have the putprpwnam function. */ #undef HAVE_PUTPRPWNAM +/* Define if you have the rand function. */ +#undef HAVE_RAND + +/* Define if you have the random function. */ +#undef HAVE_RANDOM + /* Define if you have the rdchk function. */ #undef HAVE_RDCHK @@ -280,6 +287,12 @@ /* Define if you have the sigprocmask function. */ #undef HAVE_SIGPROCMASK +/* Define if you have the srand function. */ +#undef HAVE_SRAND + +/* Define if you have the srandom function. */ +#undef HAVE_SRANDOM + /* Define if you have the stat64 function. */ #undef HAVE_STAT64 @@ -397,6 +410,9 @@ /* Define if you have the <stropts.h> header file. */ #undef HAVE_STROPTS_H +/* Define if you have the <sys/capability.h> header file. */ +#undef HAVE_SYS_CAPABILITY_H + /* Define if you have the <sys/dir.h> header file. */ #undef HAVE_SYS_DIR_H diff --git a/source3/include/includes.h b/source3/include/includes.h index 5b47e6fa35..2ec134b7c6 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -265,6 +265,10 @@ #include <poll.h> #endif +#ifdef HAVE_SYS_CAPABILITY_H +#include <sys/capability.h> +#endif + #ifndef uchar #define uchar unsigned char #endif diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 5cdd2849f8..efe7e663a0 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -122,5 +122,11 @@ typedef struct } rid_name; +struct acct_info +{ + fstring acct_name; /* account name */ + uint32 smb_userid; /* domain-relative RID */ +}; + #endif /* _NT_DOMAIN_H */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 91906eefea..c1397884b7 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -183,6 +183,10 @@ char *dos_getwd(char *s); int sys_chown(char *fname,int uid,int gid); int sys_chroot(char *dname); struct hostent *sys_gethostbyname(char *name); +BOOL set_process_capability( uint32 cap_flag, BOOL enable ); +BOOL set_inherited_process_capability( uint32 cap_flag, BOOL enable ); +long sys_random(void); +void sys_srandom(unsigned int seed); /*The following definitions come from lib/time.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index cc62234268..e1baac8f6f 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1401,9 +1401,6 @@ enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_SAMB /* case handling */ enum case_handling {CASE_LOWER,CASE_UPPER}; -/* display info */ -enum action_type { ACTION_HEADER, ACTION_ENUMERATE, ACTION_FOOTER }; - #ifdef WITH_SSL /* SSL version options */ enum ssl_version_enum {SMB_SSL_V2,SMB_SSL_V3,SMB_SSL_V23,SMB_SSL_TLS1}; @@ -1544,6 +1541,12 @@ extern int unix_ERR_code; #define OPLOCK_BREAK_INODE_OFFSET (OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T)) #define OPLOCK_BREAK_MSG_LEN (OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T)) +/* + * Capabilities abstracted for different systems. + */ + +#define KERNEL_OPLOCK_CAPABILITY 0x1 + #if defined(HAVE_KERNEL_OPLOCKS) /* * Oplock break command code sent via the kernel interface. @@ -1591,151 +1594,8 @@ struct nmb_name { unsigned int name_type; }; -struct cli_state { - int fd; - int cnum; - int pid; - int mid; - int uid; - int protocol; - int sec_mode; - int rap_error; - int privilages; - - fstring eff_name; - fstring desthost; - fstring user_name; - fstring domain; - - fstring share; - fstring dev; - struct nmb_name called; - struct nmb_name calling; - fstring full_dest_host_name; - struct in_addr dest_ip; - - struct pwd_info pwd; - char cryptkey[8]; - uint32 sesskey; - int serverzone; - uint32 servertime; - int readbraw_supported; - int writebraw_supported; - int timeout; - int max_xmit; - char *outbuf; - char *inbuf; - int bufsize; - int initialised; - /* - * Only used in NT domain calls. - */ - uint32 nt_error; /* NT RPC error code. */ - uint16 nt_pipe_fnum; /* Pipe handle. */ - unsigned char sess_key[16]; /* Current session key. */ - DOM_CRED clnt_cred; /* Client credential. */ - fstring mach_acct; /* MYNAME$. */ - fstring srv_name_slash; /* \\remote server. */ - fstring clnt_name_slash; /* \\local client. */ -}; - -struct acct_info -{ - fstring acct_name; /* account name */ - uint32 smb_userid; /* domain-relative RID */ -}; - -struct nt_client_info -{ - /************* \PIPE\NETLOGON stuff ******************/ - - fstring mach_acct; - - uint8 sess_key[16]; - DOM_CRED clnt_cred; - DOM_CRED rtn_cred; - - NET_ID_INFO_CTR ctr; - NET_USER_INFO_3 user_info3; - - /************** \PIPE\lsarpc stuff ********************/ - - POLICY_HND lsa_info_pol; - - /* domain member */ - fstring level3_dom; - fstring level3_sid; - - /* domain controller */ - fstring level5_dom; - fstring level5_sid; - - /************** \PIPE\samr stuff ********************/ - - POLICY_HND samr_pol_connect; - POLICY_HND samr_pol_open_domain; - POLICY_HND samr_pol_open_user; - - struct acct_info *sam; - int num_sam_entries; -}; - - -struct tar_client_info -{ - int blocksize; - BOOL inc; - BOOL reset; - BOOL excl; - char type; - int attrib; - char **cliplist; - int clipn; - int tp; - int num_files; - int buf_size; - int bytes_written; - char *buf; - int handle; - int print_mode; - char *file_mode; -}; - -struct client_info -{ - struct in_addr dest_ip; - fstring dest_host; - fstring query_host; - uint8 name_type; - - fstring myhostname; - fstring mach_acct; - - pstring cur_dir; - pstring base_dir; - pstring file_sel; - - fstring service; - fstring share; - fstring svc_type; - - time_t newer_than; - int archive_level; - int dir_total; - int put_total_time_ms; - int put_total_size; - int get_total_time_ms; - int get_total_size; - int print_mode; - BOOL translation; - BOOL recurse_dir; - BOOL prompt; - BOOL lowercase; - BOOL abort_mget; - - struct tar_client_info tar; - struct nt_client_info dom; -}; +#include "client.h" +#include "rpcclient.h" /* * Size of new password account encoding string. DO NOT CHANGE. |