summaryrefslogtreecommitdiff
path: root/source/include
Commit message (Collapse)AuthorAgeFilesLines
* preparing for release of 1.9.18alpha7Samba Release Account1997-10-291-1/+1
|
* split ntclient.c down into appropriate modules.Luke Leighton1997-10-292-1/+39
|
* clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()Andrew Tridgell1997-10-292-12/+3
| | | | | | | | | | | | | | 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.
* added frag field to make_rpc_hdr() functionLuke Leighton1997-10-291-1/+1
|
* byteorder.h :Luke Leighton1997-10-293-12/+11
| | | | | | | | | | | | | | | | | | | | 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!
* Adding Windows 95 printer driver code donated by Jean-Francois.Micouleau@utc.fr.Jeremy Allison1997-10-281-0/+3
| | | | | | | | | New program, make_printerdef, plus two new parameters : [global] "printer driver file" [local] "printer driver location" Jeremy.
* smb.h smbparse.c pipeutil.c :Luke Leighton1997-10-282-3/+117
| | | | | | | | | 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.
* enable sysv ipc and fast share modes on OSF1Andrew Tridgell1997-10-281-0/+1
|
* define semun for broken solaris sysvipcAndrew Tridgell1997-10-281-0/+8
|
* lower the default hash size if SEMMSL isn't definedAndrew Tridgell1997-10-281-4/+1
|
* define USE_SYSV_IPC on sunos4Andrew Tridgell1997-10-281-0/+1
|
* define USE_SYSV_IPC on a bunch more systems.Andrew Tridgell1997-10-281-9/+8
| | | | Needs some testing though.
* SYSV IPC implementation of fast share modes.Andrew Tridgell1997-10-283-13/+21
| | | | | | | | | | | | | 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.
* added LSA_Q_CLOSE and LSA_R_CLOSE (also to smb.h). implemented in smbclient.Luke Leighton1997-10-272-2/+23
| | | | | | | 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.
* preparing for release of 1.9.18alpha6Samba Release Account1997-10-271-1/+1
|
* added LSA Query Info Policy.Luke Leighton1997-10-272-6/+7
| | | | | fixed a problem with byte ordering (doing an SIVAL of the setup parameters which was _also_ being done in the creation of the SMB header. oops).
* added LSA Open Policy query and response processing to smbclientLuke Leighton1997-10-272-0/+28
|
* change the default file permissions on the SHARE_MEM_FILE* toAndrew Tridgell1997-10-271-4/+4
| | | | | | | | 0644. smbstatus now gets only read permission on the share files and does no locking. also get rid of some unnecessary umask(0) calls. smbd always runs with umask(0)
* also disable read prediction in 1.9.18Andrew Tridgell1997-10-271-0/+5
|
* Fixed 2 oplock bugs:Andrew Tridgell1997-10-271-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
* hooray. hooray some more. hooray a lot. got the client-side working.Luke Leighton1997-10-261-3/+6
| | | | | | | | Q/R LSA_REQ_CHAL; Q/R LSA_AUTH2; Q/R LSA_SAMLOGON; Q/R LSA_SAMLOGOFF. the last (non-essential right now) bit is the LSA_SRV_PWSET. the next stage is to do LSA_OPENPOLICY; add the pipe binds (missing right now); then we can test against an NT Server.
* The browse synchronisation code in nmbsync.c now uses the clientgen.cAndrew Tridgell1997-10-261-4/+5
| | | | | | | | | | | | code, which means we don't have to link with a fake getpass routine and we don't have a whole pile of global variables that really have nothing to do with nmbd and were there to keep the client code happy. The code should function identically to what it did before (hopefully it was correct) The only thing that now uses the horrible clientutil.c code is smbclient.
* preparing for release of 1.9.18alpha5Samba Release Account1997-10-251-1/+1
|
* added correct client-side credential generation / checking to the LSA SAMLuke Leighton1997-10-251-1/+1
| | | | | Logon query. i think i even got the client-side checking of the response credentials right!
* got the SAM logon request generated, and received a SAM logon response back.Luke Leighton1997-10-251-3/+3
| | | | | | | | | YEAH! need to add: - client-side credential calculation - client-side parsing of the SAM logon response.
* sam logon query creation functions. written twice because i deleted it.Luke Leighton1997-10-251-0/+14
|
* Makefile :Luke Leighton1997-10-253-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* preparing for release of 1.9.18alpha4Samba Release Account1997-10-241-1/+1
|
* preparing for release of samba-1.9.18alpha4Samba Release Account1997-10-241-1/+1
|
* nterr.c :Luke Leighton1997-10-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | added a structure that wraps nt errors as strings and enums, so we can do a smb_nt_error() function. Makefile ntclient.c : added ntclient.c, broken out nt domain stuff into a separate file. getting fed up of compile-times and size of client.c. fixed the do_lsa_req_chal() function. made it read the response, and return the challenge credentials received from the server. next stop: do_lsa_auth_2(). client.c : removed nt domain logon functions into a separate file. pipenetlog.c pipentlsa.c pipesrvsvc.c smbparse.c : i'd broken the offsets of the RPC_HDR while trying to sort out the nt client code. fixed it again. added some robustness stuff. util.c : the unistrn2() function was null-terminating the string at one character too many.
* Big change to make nmbd code more readable/understandable.Jeremy Allison1997-10-232-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is removal of find_name_search() confusion. This has been replaced with find_name_on_subnet() which makes it explicit what is being searched. Also changed wins_subnet to be wins_client_subnet in preparation for splitting the wins subnet into client and server pieces. This is a big nmbd change and I'd appreciate any bug reports. Specific changes follow : asyncdns.c: Removed wins entry from add_netbios_entry(). This is now explicit in the subnet_record parameter. interface.c: iface_bcast(), iface_nmask(), iface_ip() return the default interface if none can be found. Made this behavior explicit - some code in nmbd incorrectly depended upon this (reply_name_status() for instance). nameannounce.c: find_name_search changes to find_name_on_subnet. namebrowse.c: wins_subnet renamed to wins_client_subnet. namedbname.c: find_name_search removed. find_name_on_subnet added. add_netbios_entry - wins parameter removed. namedbsubnet.c: find_req_subnet removed - not explicit enough. nameelect.c: wins_subnet renamed to wins_client_subnet. namepacket.c: listening() simplified. nameresp.c: wins_subnet renamed to wins_client_subnet. nameserv.c: find_name_search moved to find_name_on_subnet. nameserv.h: FIND_XXX -> changed to FIND_SELF_NAME, FIND_ANY_NAME. nameservreply.c: find_name_search moved to find_name_on_subnet. Debug entries changed. nameservresp.c: wins_subnet renamed to wins_client_subnet. namework.c: wins_subnet renamed to wins_client_subnet. nmbd.c: wins parameter removed from add_netbios_entry. nmbsync: wins_subnet renamed to wins_client_subnet. proto.h: The usual. server.c: remove accepted fd from fd_set. Jeremy (jallison@whistle.com)
* general sorting out, from crashes generated by do_lsa_req_chal() in client.cLuke Leighton1997-10-231-2/+2
| | | | | | | | | | | trying to set up the data parameters etc and not understanding what's going on. in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received (and in this instance, generated by do_lsa_req_chal()). and then noticed that it's two bytes out. but i don't know how to do "byte parameters" and it's not the same format as the LSA_REQCHAL received from nt workstations. agh!
* playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)Luke Leighton1997-10-231-2/+2
| | | | and then send a LSA_REQ_CHAL down it.
* Makefile client.c :Luke Leighton1997-10-222-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Makefile client.c clientutil.c clitar.c nmbsync.c :Luke Leighton1997-10-222-9/+24
| | | | | | | | | | | | | | | | | | | | | 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.
* loadparm.c :Luke Leighton1997-10-222-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* shared memory code cleanups (partly preparing for a possible sysVAndrew Tridgell1997-10-222-13/+35
| | | | shared memory implementation)
* Implemented asynchronous DNS lookups in nmbd.Andrew Tridgell1997-10-221-11/+12
| | | | | | | | | | | | | | | | | | | | | I realised this afternoon just how easy it is to add this, so I thought I'd implement it while the idea was fresh. nmbd forks at startup and uses a pipe to talk to its child. The child does the DNS lookups and the file descriptor of the child is added to the main select loop. While I was doing this I discovered a bug in nmbd that explains why the dns proxy option has been so expensive. The DNS cache entries in the WINS list were never being checked, which means we always did a DNS lookup even if we have done it before and it is in cache. I'm sure this used to work (I tested the DNS cache when I added it) so someone broke it :-( Anyway, the async DNS gets rid of the problem completely. I'll commit just the fix to the DNS cache bug to the 1.9.17 tree. You can disable async DNS by adding -DSYNC_DNS to the compile flags.
* WHATSNEW.txt: Updated for alpha3.Jeremy Allison1997-10-211-1/+1
| | | | | | | server.c: int16 -> uint16 fix for port comparisons in oplock code. Needed for Solaris. version.h: Updated to alpha3. Jeremy (jallison@whistle.com)
* WHATSNEW.txt: Preparing for 1.9.18alpha2 release.Jeremy Allison1997-10-211-1/+1
| | | | | | smb.conf.5: Added 'bind interfaces only' parameter. version.h: Updated to 1.9.18alpha2. Jeremy (jallison@whistle.com)
* chgpasswd.c:Jeremy Allison1997-10-211-0/+1
| | | | | | | includes.h: SCO changes. server.c: Added code in open_sockets to allow 'bind interfaces only' to work as documented. Jeremy (jallison@whistle.com)
* loadparm.c :Luke Leighton1997-10-212-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* prototype updatesAndrew Tridgell1997-10-211-10/+25
|
* rewrote the password server code using the new clientgen.c clientAndrew Tridgell1997-10-211-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).
* get rid of the KEEP_PASSWORD_SERVER_OPEN defineAndrew Tridgell1997-10-211-4/+0
|
* loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison1997-10-201-2/+5
| | | | | | | | | | | | | 'dos filetimes' parameter for UTIME fix. locking_shm.c: Fixed typo (sorry Andrew :-). namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only(). proto.h: The usual. reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime). server.c: Made filetime calls use new file_utime call (wrapper for sys_utime). system.c: Added Andrew's sanity checks to times in sys_utime(). time.c: Moved set_filetime() to server.c. Made null_mtime() global. trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime). Jeremy (jallison@whistle.com)
* added "domain groups" parameter, allowing you to specify the groups thatLuke Leighton1997-10-201-1/+3
| | | | | | the user belongs to. it would be nice to know exactly what the domain groups _are_....
* removed home_share from user_info structure.Luke Leighton1997-10-201-4/+0
|
* util.c password.c :Luke Leighton1997-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | added automount_server() function which, if -DAUTOMOUNT is in use, returns the server name of the NIS auto.map entry. otherwise, it returns local_server. added use of automount_server() for a new substitution %N for NIS home server. this defaults, via automount_server(), to the same functionality as %L if -DAUTOMOUNT is not used. removed vuser->home_share. moved code that grabbed the servername into the separate function automount_server(). loadparm.c : created "logon drive" (default of "") created "logon home" (default of "\\%N\%U") changed default of "logon path" from NULL to "\\%N\%U\profile". ipc.c pipenetlog.c : use lp_logon_drive(), lp_logon_home() and lp_logon_path() in their now easier-to-use form (don't have to check if *lp_logon_path() and manually substitute a default of \\%L\%U and do a standard_sub_basic() on the result, because the default automatically does this.
* a major share modes reorganisation.Andrew Tridgell1997-10-202-72/+36
| | | | | | | | | | | | | | | | | | | 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.