summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
AgeCommit message (Collapse)AuthorFilesLines
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-4/+4
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1998-01-12*** empty log message ***Andrew Tridgell1-0/+1
(This used to be commit 7b031586ca33a381eb0e27f3557f43c2550df5f8)
1998-01-05Added 3 commands:Volker Lendecke1-0/+19
smbmount: This is a stripped down smbclient that communicates with the Linux 2.1.x kernel to supply authenticated smb connections for smbfs mount points. smbmnt/smbumount: setuid commands that do the actual smb mount system call after having done the appropriate security checks (This used to be commit ccbbc4e647ad900b215dae949d5bcd45671c68c8)
1997-12-04don't use free and alloc as structure elementsAndrew Tridgell1-3/+3
(This used to be commit f7066355b00a169423b4f64f58567e19b52abc1b)
1997-12-02get rid of some things out of smb.h that are already in local.hAndrew Tridgell1-12/+0
(This used to be commit d55df52487ca6786f1635276b2787857a772219a)
1997-11-29added a sent_oplock_break element to Files[] as a paranoia check so weAndrew Tridgell1-0/+1
can't sent a oplock break twice on the same file. changed some debug levels in the oplock code to level 0 so we can track down a bug zero the returned Files[] entry in find_free_file() don't try to overcome client bugs in the handling of non-encrypted passwords if in server level security mode added paranoid null termination of password buffers slight change to my ajt_panic() routine (This used to be commit e360c79c9cec681c4609783019749773d3e79386)
1997-11-28get_entries is an int not a boolAndrew Tridgell1-1/+1
(This used to be commit 84215c9b91f3c5130b172a3bbc83c7ddd66c5cb8)
1997-11-17loadparm.c : Added "veto oplock files" parameter.Jeremy Allison1-0/+2
make_printerdef.c: Fixed warning. quotas.c: Fixed irix root errors. server.c: Fixed oplock reference count bug. smb.h: Added IS_VETO_OPLOCK_PATH(). Jeremy. (This used to be commit c28487df63e29bc0f8d2ece876a07a2a076d4c73)
1997-11-10Rolled back tree state to 11:59pm 8th November 1997 EST toJeremy Allison1-44/+6
remove problems. Jeremy (This used to be commit 4a36ac236c2ad634f05efcd0179875d09988614a)
1997-11-09attempting to mark up 32 bit error codes, needed for NT domains.Luke Leighton1-6/+44
separated out smb server-mode password validation into a separate file. added called and calling netbios names to client gen state: referenced section in rfc1002.txt. created workstation trust account checking code in ntclient.c there might be a bug in reply_session_setup_andX. i indented and added { } around single-line if statements: the lm password checking code now doesn't look right (around the GUEST_SESSSETUP bits). *no code semantics have been changed by the indentation process*. (This used to be commit f27966957fa7f16d337a4a58719239d036deab4c)
1997-11-07ipc.c :Luke Leighton1-30/+46
added a #define around the alignment thing: it's a way to stop NetMonitor from decoding your packets!!!! proto.h : usual. reply.c : added what i believe to be the correct error messages for getting correct domain joining. smb.h : some guesses at good names of the SAMR_XXXX functions. sorting out the SAMR_LOOKUP_RIDS function. this is *not* the same as the LSA_LOOKUP_RIDS function, unless paul accidentally put it on the ntlsa pipe by mistake, instead of the samr pipe :-) rpc_pipes/lsa_hnd.c rpc_pipes/pipe_hnd.c : moved creation and allocation of unique policy handles into this module. rpc_pipes/pipesamr.c rpc_pipes/samrparse.c rpc_pipes/smbparse.c : SAMR_LOOKUP_RIDS is beginning to look _suspiciously_ like the LSA_LOOKUP_RIDS function. but i know that there are subtle discrepancies. (This used to be commit 6bc07b0b4193e28b13a675fece8d9d6b365a7eb0)
1997-11-06following a cvs error, i am rewriting this monster-commit. with bad grace.Luke Leighton1-62/+252
Modified Files: --------------- Makefile: adding extra files ipc.c : send_trans_reply() - alignment issue. this makes the alignment the same as that in NT. this should be looked at by people who understand the SMB stuff better than i. api_fd_commands[] - added samr and wkssvc pipes. loadparm.c : lp_domain_controller() changed to mean "samba is a domain controller". it's a "yes/no" parameter, now. no, it isn't used _anywhere_. namedbwork.c nameelect.c : if "domain controller = yes" then add SV_TYPE_DOMAIN_CTRL to the host _and_ workgroup announcements. yes, you must do both: nt does. namelogon.c : important NETLOGON bug in SAMLOGON request parsing, which may be the source of some people's problems with logging on to the Samba PDC. password.c : get_smbpwnam() renamed to get_smbpwd_entry(). pipes.c : added samr and wkssvc pipes. proto.h : usual. can we actually _remove_ proto.h from the cvs tree, and have it as one of the Makefile dependencies, or something? reply.c : get_smbpwnam() renamed to get_smbpwd_entry() - also changed response error code when logging in from a WORKSTATION$ account. yes, paul is right: we need to know when to return the right error code, and why. server.c : added call to reset_chain_pnum(). #ifdef NTDOMAIN added call to init_lsa_policy_hnd() #endif. jeremy, you'd be proud: i did a compile without NTDOMAIN, and caught a link error for this function. smb.h : defines and structures for samr and wkssvc pipes. smbpass.c : modified get_smbpwnam() to get_smbpwd_entry() and it now takes two arguments. one for the name; if this is null, it looks up by smb_userid instead. oh, by the way, smb_userids are actually domain relative ids (RIDs). concatenate a RID with the domain SID, and you have an internet globally unique way of identifying a user. we're using RIDs in the wrong way.... added mod_smbpwnam() function. this was based on code in smbpasswd.c rpc_pipes/lsaparse.c : added enum trusted domain parsing. this is incomplete: i need a packet trace to write it properly. rpc_pipes/pipe_hnd.c : added reset_chain_pnum() function. rpc_pipes/pipenetlog.c : get_smbpwnam() function renamed to get_smbpwd_entry(). arcfour() issues. removed capability of get_md4pw() function to automatically add workstation accounts. this should either be done using smbpasswd -add MACHINE$, or by using \PIPE\samr. rpc_pipes/pipe_util.c : create_pol_hnd() - creates a unique LSA Policy Handle. overkill function: uses a 64 bit sequence number; current unix time and the smbd pid. rpc_pipes/smbparse.c : arcfour() issues. smb_io_unistr2() should advance by uni_str_len not uni_max_len. smb_io_smb_hdr_rb() - request bind uses uint16 for the context id, and uint8 for the num_syntaxes. oops, i put these both as uint32s. Added Files: ------------ rpc_pipes/lsa_hnd.c : on the samr pipe, allocate and associate an LSA Policy Handle with a SID. you receive queries with the LSA Policy Handle, and have to turn this back into a SID in order to answer the query... rpc_pipes/pipesamr.c rpc_pipes/samrparse.c \PIPE\samr processing. samr i presume is the SAM Replication pipe. rpc_pipes/pipewkssvc.c rpc_pipes/wksparse.c \PIPE\wkssvc processing. the Workstation Service pipe? holy cow. (This used to be commit 1bd084b3e690eb26a1006d616075e53d711ecd2f)
1997-11-04smb.h :Luke Leighton1-1/+1
LSA_OPENSECRET and three other unknown #defines are commented as not being the real defines for these!!! rpc_pipes/pipenetlog.c : USE_ARCFOUR for Server Password Set. and then ignore the password (agh!) this will *fail* to do logins, by the way. i need to add a routine to update the smb password (next job). (This used to be commit b9d26344cc9b64ef3578931d099d52eab080fdd3)
1997-11-02convert the credentials code back to uchar[8] from uint32[2]Andrew Tridgell1-3/+2
This should fix the byte order problems (maybe!) (This used to be commit 21878e7d8628d05786c3c76f2943e31df1096577)
1997-11-01some locking code cleanupsAndrew Tridgell1-3/+0
(This used to be commit 6d77311d6cecabafb86c02e26b30724425ef6208)
1997-10-30removed mechanism that created actual files NETLOGON, lsarpc and the like,Luke Leighton1-1/+2
which are pipes on the IPC$ connection. created mechanism to record pipe names in a separate pipes_struct. it is planned to expand this, to return sensible things like interface structures, and policy handles (RPC_IFACE and LSA_POL_HND). and the like. (This used to be commit 33cce5fac0e2f818a19a6c4e6a797ef44f3b5c75)
1997-10-29ipc.c ntclientpipe.c:Luke Leighton1-0/+1
response to Bind Acknowledgment needs a lookup table for the PIPE string (secondary address in RPC_HDR_BA structure). smbparse.c util.c : interesting problem, i think caused by us typecasting a uint16* buffer to char*. found on a SPARC. (This used to be commit 420408ee83902faa6cf871f26e93ad5efb483727)
1997-10-29split ntclient.c down into appropriate modules.Luke Leighton1-1/+1
(This used to be commit 50d7e4d6f6b5d770742ee83523d6146cf51f8259)
1997-10-29clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()Andrew Tridgell1-9/+1
and made it private to the 2 shmem implementations. Added new shmops->hash_size() function. Added code to handle the IPC system limits by looping decreasing the size of the resources (semaphores and shared memory) that we request until we get under the system limits, which can be quite low on some systems! Added checks that the creator of the IPC objects is root. Otherwise we would be open to a security hole where someone pre-creates the shared memory segment and attaches. (This used to be commit 6b6f624b63137d4750200e8cb4961b1402513632)
1997-10-29byteorder.h :Luke Leighton1-4/+2
added mode for printing debug array data as chars not uint8/16/32s. only really useful for (uint8) strings or (uint16) unicode strings lsaparse.c smbparse.c smb.h : rpc bind and rpc bind ack structures and parsing and creation functions. ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c : using rpc bind / bind ack parsing routines instead of incorrect use of api_LsarpcTNP1 function. ntclient.c : creation of do_rpc_bind() function. THAT'S IT, FOLKS! (This used to be commit 21c89e2f17c51939fd6b53dddbe3072419eb0db2)
1997-10-28smb.h smbparse.c pipeutil.c :Luke Leighton1-1/+90
added bind and bind ack structures and parsing functions. restructured rpc header stuff. ntclient.c pipenetlog.c pipentlsa.c pipesrvsvc.c : having to deal with restructuring above. (This used to be commit 9f2c4f1fee7e411adba8f529b7666a7325584457)
1997-10-28lower the default hash size if SEMMSL isn't definedAndrew Tridgell1-4/+1
(This used to be commit 9f0be847fdbcf0f8bbd69de6cdf277ae0440bcda)
1997-10-28SYSV IPC implementation of fast share modes.Andrew Tridgell1-1/+4
It will try sysv IPC first, then if that fails it will try mmap(), then after that it will try share files. I have defined USE_SYSV_IPC for Linux, Solaris and HPUX at the moment. Probably a lot more could have it defined. In fact, the vast majority of systems support it. Need autoconf again :-) It should actually be faster than the mmap() version, and doesn't need any lock files. This means the problem of the share mem file being on a NFS drive will be gone. (This used to be commit cc8fe0f0629eea9acc39e30d8d76d5890a5b6978)
1997-10-27added LSA_Q_CLOSE and LSA_R_CLOSE (also to smb.h). implemented in smbclient.Luke Leighton1-2/+19
updated Query Info Policy to report domain name and domain sid for info levels 3 and 5. fixed bug in dom_sid_to_string (idauths decoded wrong). fixed bug in DOM_SID: subauths are 32 bit not 16. (This used to be commit 2f3cca23e2465ca6a3a31fda005af1fd74f6af92)
1997-10-27added LSA Open Policy query and response processing to smbclientLuke Leighton1-0/+22
(This used to be commit 16cc27852bf54999db4b0a3665b0743d9fe0e74a)
1997-10-27Fixed 2 oplock bugs:Andrew Tridgell1-4/+2
1) the oplock macros in smb.h used | where they should have used &. This means that smbd thought that all clients were always requesting oplocks. This would have _really_ confused smbclient and smbfs when they started receiving async oplock break requests when they don't even know what an oplock is! 2) an oplock break request from a client can be embedded in a normal lockingX request, and will be if the client has batched any lock requests internally. The smbd code assumed that all oplock break requests had num_locks==num_ulocks==0 which is not true. The only thing special about a oplock break request with num_locks==num_ulocks==0 is that no reply is sent. Otherwise it is processed as a normal locking request in addition to the oplock break processing. These two fixes get the MS mail system in Win98 working on a Samba 1.9.18 network drive. Andrew (This used to be commit ed71534df56d0296280dbde1859597fb42002088)
1997-10-25added correct client-side credential generation / checking to the LSA SAMLuke Leighton1-1/+1
Logon query. i think i even got the client-side checking of the response credentials right! (This used to be commit f14c111835e18e361468cc6a1666a02654afe743)
1997-10-25got the SAM logon request generated, and received a SAM logon response back.Luke Leighton1-3/+3
YEAH! need to add: - client-side credential calculation - client-side parsing of the SAM logon response. (This used to be commit 349677de3f06bb0892862de0e11172adeffda18a)
1997-10-25Makefile :Luke Leighton1-3/+3
adding bits for new nt domain code byteorder.h : trying to get macros right, and not to crash on SUNOS5... client.c : added #ifdef NTDOMAIN, and created do_nt_login() function. don't want to have to recompile client.c unless absolutely necessary. credentials.c : moved deal_with_creds() [possibly inappropriately] into credentials.c ipc.c reply.c server.c uid.c : attempting to make (un)become_root() functions calleable from smbclient. this is a little tricky: smbclient might have to be another setuid root program, immediately setuid'ing to non-root, so that we can reset-uid to root to get at the smbpasswd file. or, have a secure pipe mechanism to smbd to grab smbpasswd entries. or the like. smbdes.c smbencrypt.c : created a function to generate lm and nt owf hashes. lsaparse.c ntclient.c smbparse.c : added nt client LSA_AUTH2 code. it works, too! pipenetlog.c pipentlsa.c pipesrvsvc.c : simplification. code-shuffling. getting that damn offset right for the opcode in RPC_HDR. smb.h : changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL. we might need to store the server times as well. proto.h : the usual. (This used to be commit 82436a3d99d4bdce249ce9ff27fd2ca4b2447e07)
1997-10-22Makefile client.c :Luke Leighton1-0/+8
adding start of undocumented options to do NT domain logons, client-side. starting with LSA_REQCHAL. the code here happily crashes smbd: i'll investigate this further... :-) smbparse.c pipeutil.c lsaparse.c : moved some of the common make_xxxx() functions out of pipeutil.c so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit together. makes sense, really... added a make_q_req_chal() function. restructured make_rpc_reply() and called it make_rpc_hdr(). created functions create_rpc_reply() and create_rpc_response(). pipenetlog.c pipentlsa.c pipesrvsvc.c calling new create_rpc_reply() function instead of old make_rpc_reply(). proto.h : usual. smb.h: added enum for RPC_PACKET_TYPE (This used to be commit b88ee3e16c6b671069f53ca2e9c5694ec8b1c030)
1997-10-22Makefile client.c clientutil.c clitar.c nmbsync.c :Luke Leighton1-0/+6
redid the split that i did a year ago, taking the functions in client.c out into clientutil.c. guess what? we could now do encrypted password NetServerEnum2 calls in nmbd, if we wanted to. i can now use cli_call_api() to send to different pipes. i hope. pipenetlog.c: allow adding to users group _and_ to admin group. if adding to guest group, don't allow adding to users or admin as well. smb.h : added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...) proto.h : usual. (This used to be commit 6ee065ce6e099acfc7e83ad399ef6e60b4c625c1)
1997-10-22loadparm.c :Luke Leighton1-4/+4
added "domain other sids" parameter pipenetlog.c : using "domain other sids" parameter in SAM Logon response. using new name_to_rid() function for r_uid and r_gid. pipentlsa.c : minor mods to do with new name_to_rid() function. pipesrvsvc.c : in the "net share enum" response, allocate some more space for the buffer. there can be only 32 share entries in the response anyway. this needs to be dealt with. pipeutil.c : modified name_to_rid() function to use new parameters "domain admin users" and "domain guest users", but will otherwise do unix uid + 1000. moved make_dom_gids() here. proto.h: the usual. smb.h smbparse.c : renamed sid_no to sid_rev_num in DOM_SID, and gid to r_gid in DOM_GID. util.c : moved make_dom_gids() from here. created char *unistrn2(uint16* uni_buffer, int max_len) (This used to be commit ec60e48d7982240b7755d246b2f1e8989467f66f)
1997-10-22shared memory code cleanups (partly preparing for a possible sysVAndrew Tridgell1-2/+17
shared memory implementation) (This used to be commit 8d1993c71a5d5d32636f62ba9b9a9009ec74d730)
1997-10-21loadparm.c :Luke Leighton1-0/+28
added "domain admin users" parameter added "domain guest users" parameter these two complement the "domain groups" parameter. the "domain groups" parameter should be for your own groups, and well-known aliases. util.c : added ability to do "domain groups = power_users admin_users backup_ops" which are well-known RID aliases, not well-known RID groups. pipenetlog.c : combine the "domain admin users"; "domain guest users" and "domain groups" parameters to give an array of RID groups to include in the SAM Logon response. ipc.c smb.h : moved REALLOC() into smb.h added RID #defines. proto.h: usual. (This used to be commit f2554f231d1f59f30224adcc02b2b3ca4c24e0dd)
1997-10-21rewrote the password server code using the new clientgen.c clientAndrew Tridgell1-0/+26
interface The new code uses a source netbios name equal to the Samba servers name, not the client name. It also uses NetWkstaUserLogon to do a full network logon. This means it will honour the servers logon restrictions (such as login times etc). (This used to be commit 11de90f972f6d83974425e80014f54e15d495413)
1997-10-20removed home_share from user_info structure.Luke Leighton1-4/+0
(This used to be commit c59b8cee4721eeeb79f07f48ac17492530d4cdb1)
1997-10-20a major share modes reorganisation.Andrew Tridgell1-54/+15
The shares modes code is now split into separate files. The shared memory implementation is in locking_shm.c. The slow implementation is in locking_slow.c It is all controlled by a struct share_ops structure that has function pointers to the implementation of all the functions needed by a share modes implementation. An initialisation function sets up this structure. This will make adding new implementations easy and clean. This also allowed me to get rid of the ugly code in smbstatus. Now status.c links to the locking code and calls methods in share_ops. I also renamed some things and generally organised things in a much cleaner fashion. Defines and structures specific to each implementation have been moved to the appropriate file and out of smb.h. (This used to be commit 65ab9adaa0d356b8041ed8a507ea52117f2a284e)
1997-10-19debugging the srvsvc Net Share Enum. some padding issues; some string lengthLuke Leighton1-1/+3
issues. it works! (This used to be commit 80523a3e83191c9e0b930fc71bd502a94a6f1b19)
1997-10-19creating NetShareEnum parsing / reply creation. compiles, but untested.Luke Leighton1-4/+5
(This used to be commit 0a191ee5047b2c81c7adb0554c39ec43d8690230)
1997-10-19Makefile :Luke Leighton1-9/+19
added srvparse.o and pipesrvsvc.o smb.h : mods to the Net Share Enum stuff srvparse.c : Net Share Enum parsing support. more srvsvc pipe parsing to go here... pipenetlog.c util.c: modified standard_sub_basic() so that you can set a global boolean and use a different string for the %U username substitution. proto.h: the usual. (This used to be commit 22b86b6499b2680d16cb4180a736b4e750147409)
1997-10-19added the following structures:Luke Leighton1-0/+67
SH_INFO_1 SH_INFO_1_STR SHARE_INFO_1_CTR SRV_Q_NET_SHARE_ENUM SRV_R_NET_SHARE_ENUM the share info1 container can handle a maximum of 32 shares. the share info1 string structures contain two unicode strings, with 1024 uint16 characters _each_. we're going to _have_ to dynamically allocate the unicode strings, else we'll run out of stack space. rapidly. (This used to be commit e8bedb18bf249d2f06834b0f151ea22df86e2602)
1997-10-17pipenetlog.c lsaparse.c smb.h :Luke Leighton1-2/+2
SAM logon sorting. too many buffer pointers. added in the missing switch value (value of 3). dealing with the buffer pointers to the user info structure in a slightly different way. (This used to be commit 7993e17c9a1edddae6407d3f12790c461def705a)
1997-10-17smbparse.c smb.h :Luke Leighton1-1/+1
uni_max_len and uni_str_len are the other way round, in UNIHDR. util.c : increased the show_msg() data size from 256 bytes to 512 bytes: the LSA SAM Logon response can be about 500 bytes long. pipenetlog.c : forgot to set the authoritative field to 1. (This used to be commit 71c6678cd7ffe30a5da27766cf99147e1921feae)
1997-10-16smb.h :Luke Leighton1-2/+5
id_info_1 has a pointer at the front of it. so does return credentials, and so does the client credentials. these are all from the sam logon. auth_level is 16 bytes not 32 and is actually called a switch_level. smbparse.c : smb_io_unihdr() - uni_max_len and uni_str_len are 16 bytes not 32. this may have a knock-on effect on smb_in_unihdr2() but we'll see... (This used to be commit ce36bfb3e4ad4b72a9f9759a3c49d2a73175d249)
1997-10-15smb.h smbparse.c pipenetlog.c :Luke Leighton1-4/+22
whoops, the SAM Logon structure was wrong. updated this, and cifsntdomain.txt. more debug info in pipenetlog.c. the crash is somewhere around deal_with_credentials(). byteorder.h : put in uint8, uint16 and uint32 typecasts around debug info, because sign extending was resulting in ffffffe8 being displayed instead of e8. credentials.c : some debugging info, because i'm tracking a coredump. without gdb. nothing like making things difficult. reply.c : whoops, missed this (important) bit from paul's code, which tells the NT workstation that the MACHINE$ entry doesn't already exist, and we're going to create a default entry with a password "machine" right now. proto.h: the usual. (This used to be commit ed606bc7d4e6fb1091e527ea70a3e950d50a1db4)
1997-10-15added srvsvc basic pipe, straight from paul's code. does NETSHAREENUMLuke Leighton1-0/+3
and NETSERVERGETINFO. (This used to be commit 96b17b829fc787c15cd366eca604c09d68b5b900)
1997-10-14credentials, query info reply.Luke Leighton1-4/+3
(This used to be commit 9b095887df204393090d7da9a47508685ddd5163)
1997-10-12updated rpc header reply: callid wrong; alloc hint a uint32 not a uint16.Luke Leighton1-1/+1
still doesn't get rid of the netlogon trans2 request with zero data. (This used to be commit 0cf67955f09d99c452bfc3fdde00dcea98e21db1)
1997-10-10added lsa_reply_srv_pwset()Luke Leighton1-1/+1
(This used to be commit 0d043cfef289ee82287bb6014a164ba83ca87f30)
1997-10-10Makefile:Luke Leighton1-6/+37
added credentials.c to smbd credentials.c: using credential structures instead of char* password.c uid.c server.c: added sid and attr to user_struct. smbdes.c: smbhash and str_to_key make public instead of private. pipes.c smb.h: lsa structures, sub-functions. proto.h: usual. (This used to be commit 87a0a944855a673d693d934e446bdc231b1c7f02)