summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
1997-10-30removed mechanism that created actual files NETLOGON, lsarpc and the like,Luke Leighton3-80/+111
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-29zero data parameter being passed to smb_io_rpc_hdr(), which couldn't cope.Luke Leighton1-1/+1
(This used to be commit c0137cd8fe1362beef9ce879cc558869bdf2edfa)
1997-10-29ipc.c ntclientpipe.c:Luke Leighton1-10/+14
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-29ipc.c :Luke Leighton1-1/+12
bind ack should contain \PIPE\pipename not just pipename. ntclientpipe.c : sanity in bind ack: pipe name checks; transfer syntax checks; reason checks. (This used to be commit c2e2197e9d87795bda0198247c7bb132fe586fc1)
1997-10-29added frag field to make_rpc_hdr() functionLuke Leighton1-1/+1
(This used to be commit 6b0e51929495582bc48a4d5fba24aa7c1f7caaf6)
1997-10-29byteorder.h :Luke Leighton2-6/+44
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-28Adding Windows 95 printer driver code donated by Jean-Francois.Micouleau@utc.fr.Jeremy Allison1-6/+133
New program, make_printerdef, plus two new parameters : [global] "printer driver file" [local] "printer driver location" Jeremy. (This used to be commit 9a5b42e6b3e7a35d56f81e9428fc747246e2fc5c)
1997-10-28refuse pathworks type R connect (patch from Stephen Tweedie)Andrew Tridgell1-24/+39
(This used to be commit c63fee2b282c8b53f87e63995384602b66a805a6)
1997-10-27checks against file handle in api_fd_reply(). i don't know what errorLuke Leighton1-6/+18
message should be returned, so i just let it fall through to sending an "api_unsupported" (This used to be commit 85d132da6756da0904fe894ea617b84e38e610ff)
1997-10-27change the default file permissions on the SHARE_MEM_FILE* toAndrew Tridgell1-1/+1
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) (This used to be commit c6ac10170dbba57dfebc54c50d79cb29d13bb442)
1997-10-27also disable read prediction in 1.9.18Andrew Tridgell3-2/+15
(This used to be commit 0f15558efb26b7215540a588dfe8733e9346d407)
1997-10-27Fixed 2 oplock bugs:Andrew Tridgell1-14/+14
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-25Makefile :Luke Leighton4-30/+29
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-24nterr.c :Luke Leighton1-1/+1
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. (This used to be commit 39cec7f698c4461aee05cfbb213879fbd486117d)
1997-10-23Big change to make nmbd code more readable/understandable.Jeremy Allison1-0/+2
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) (This used to be commit 2c97b33fc0b5ef181dbf51a50cb61074935165bf)
1997-10-23general sorting out, from crashes generated by do_lsa_req_chal() in client.cLuke Leighton1-1/+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! (This used to be commit 0cc8ce43e1d54b44237bb525f4cf6b77e7ca3ced)
1997-10-22client.c :Luke Leighton1-9/+24
send to \PIPE\ not \PIPE\NETLOGON. ipc.c : fstring name not being bzero'd caused problems when calling named_pipe(). (This used to be commit 2393c49b0509b8ce021f0acfba135219cd753cf9)
1997-10-21WHATSNEW.txt: Updated for alpha3.Jeremy Allison1-2/+2
server.c: int16 -> uint16 fix for port comparisons in oplock code. Needed for Solaris. version.h: Updated to alpha3. Jeremy (jallison@whistle.com) (This used to be commit 2d9645e99ba30a5cce4372ff80d1bd26c516ac34)
1997-10-21chgpasswd.c:Jeremy Allison2-73/+153
includes.h: SCO changes. server.c: Added code in open_sockets to allow 'bind interfaces only' to work as documented. Jeremy (jallison@whistle.com) (This used to be commit 46ac5928d9069af1dc60e9724f38e228dd578937)
1997-10-21loadparm.c :Luke Leighton1-2/+0
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-21damn, I spelt EACCES wrong.Andrew Tridgell1-1/+1
actually it's wrong in the linux man page for utime ... (This used to be commit 267b56de10a20c25faee69cf4b6b6c02887ebe9c)
1997-10-21check for EPERM or EACCESS in file_utime()Andrew Tridgell1-1/+6
(This used to be commit afd7592ffd74fbc77f4b177b007291df95f418ef)
1997-10-21don't check lp_alternate_permissions() in the new utime workaroundAndrew Tridgell1-14/+12
code. lp_alternate_permissions() is intended only to affect the display of file permissions, not what you can actually do with the files. (This used to be commit 454802d5922bf2b2c6df1f084e183611937ee5fb)
1997-10-21fix the order of become_uid() and become_gid() in become_root(). ThisAndrew Tridgell2-9/+2
was a harmless bug but left log entries code cleanup in reply_lanman2() (This used to be commit 8e90e1ef276c4cc362e32985c2845fc4c5108273)
1997-10-21rewrote the password server code using the new clientgen.c clientAndrew Tridgell3-253/+191
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-21add some debug infoAndrew Tridgell1-0/+2
(This used to be commit b22fa0d7e3d1158112e03f93a22232e719fe6003)
1997-10-20loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison3-13/+69
'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) (This used to be commit 41a1d81c112a82ad2ae1b3c4ee81051f133ce1ed)
1997-10-20util.c password.c :Luke Leighton2-64/+2
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. (This used to be commit c6c28a4c3c9010ff9d5eac4bad091189a786d5a0)
1997-10-20a major share modes reorganisation.Andrew Tridgell2-18/+14
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-20casting cleanupsAndrew Tridgell1-1/+1
(This used to be commit ab849a97821c9e1f199eea8ea2ec477687bed947)
1997-10-19pipes.c pipesrvsvc.c :Luke Leighton1-80/+0
moved stub srvsvc pipe function into separate file, in preparation for further work. (This used to be commit 2f2d18cc9474e1b40765a67242659be7c63a9936)
1997-10-18put the NT_STATUS_ALLOTTED_SPACE_EXCEEDED error in instead of 0x99.Luke Leighton1-1/+2
whatever that means. (This used to be commit ce54f3a7a965b0a9f888dc45d6f4633609d5ca08)
1997-10-17Simply moved the #include for ubi_dLinkList.h from within dir.c toChristopher R. Hertel1-2/+0
includes.h. More consistent with current practice. (This used to be commit cb51c860b352fb9d07fb3298d0317274ba6c9925)
1997-10-16Added Michael Johnsons' PAM modifications <johnsonm@redhat.com>John Terpstra1-12/+12
This patch has been checked over. JHT (This used to be commit c84a043f89ccba001597962cd03e2f2a634c4b08)
1997-10-16Made changes to the dir cache functions:Christopher R. Hertel1-83/+121
- They now use the ubi_dLinkList linked list code. This is not a big gain, I suppose. It would be significant if there were lots of doubly-linked lists in the code and I replaced them all. The only other advantage is that the code is more modular, which appeals to my own sense of order, if no one elses. :-} - I allocate space for the entry structure and the strings in one go, instead of using malloc() and separate strdup() calls. This should be more efficient, and allows for a single call to free() to free the whole thing. These are very minor changes, but they do serve to make me more familiar with the code overall. (This used to be commit 1dafef88871338f06dbcbbb67ce3bbbb460d7bb6)
1997-10-15ipc.c: Adding Andrews become_root code to the main branch.Jeremy Allison6-22/+106
locking.c: Adding Andrews become_root code to the main branch. pipes.c: Fixing the close_file issue. proto.h: The usual. reply.c: Move smb_pass into NTDOMAIN defined code. Fixing the close_file issue. server.c: Fixing the close_file issue. trans2.c: Fixing the close_file issue. uid.c: Adding Andrews become_root code to the main branch. Jeremy (jallison@whistle.com) (This used to be commit 16fd4337f79ce33f91050c96c4a566221c5d9126)
1997-10-15smb.h smbparse.c pipenetlog.c :Luke Leighton1-1/+24
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 Leighton2-0/+84
and NETSERVERGETINFO. (This used to be commit 96b17b829fc787c15cd366eca604c09d68b5b900)
1997-10-15force the salt to be a maximum of 2 characters long in callsAndrew Tridgell1-0/+1
to crypt() This might solve some password problems, particulary on HPUX (This used to be commit 45f4ae4327a8836cad22bbf64f1effba6a6eb7f5)
1997-10-13split pipes.c down into util, netlog and ntlsa.Luke Leighton1-1135/+1
(This used to be commit 8fe02c239d70497af449ed0cdf1a32de10021ba1)
1997-10-13debugging... no idea what i'm doing.Luke Leighton1-9/+10
(This used to be commit d7a9a02e0a9e1e791810c24bcfcbd39a6bd7dac5)
1997-10-13debug info addedLuke Leighton1-0/+4
(This used to be commit a3f96555b47265b8cd4d1f735af58375e2591d56)
1997-10-13checked in a file with a compile error. oops!Luke Leighton1-1/+0
(This used to be commit 28d96c7e6de19a28346d406ccc6fc8b00305903b)
1997-10-13byteorder.h :Luke Leighton1-292/+54
debugging output wasn't (still isn't) perfect. credentials.c lsaparse.c smbparse.c : added DEBUG strings. pipes.c : lost some changes, to do with setup of RPC headers. arg. (This used to be commit 9fdd697d17b68293bb95fd68f44c24f0f5b97f5f)
1997-10-12getting somewhere.Luke Leighton2-51/+65
ipc.c : removed srvsvc pipe reference: have to do that. pipes.c lsaparse.c smbparse.c : more debugging info. looks a bit like netmon output. (This used to be commit e02aa88e25ae6d4da7953aaff04ff2ae9a656d05)
1997-10-12updated rpc header reply: callid wrong; alloc hint a uint32 not a uint16.Luke Leighton1-21/+15
still doesn't get rid of the netlogon trans2 request with zero data. (This used to be commit 0cf67955f09d99c452bfc3fdde00dcea98e21db1)
1997-10-12ipc.c:Luke Leighton2-50/+52
debugging info. found that data = NULL because of short packet length indicated from the ntlsaRPC pipe _royally_ stuffs NT's packet handling. maybe this should go down as a service denial bug to the ntbugtraq list. pipes.c lsaparse.c smbparse.c : added more debug stuff. added length of header to data_len in MSRPC fragment_length field (0x18 bytes short) which caused the above bug from NT 4.0. oops. (This used to be commit a6f8de6815e0b85bb23b302980730501ac0b87e5)
1997-10-12added debugging macros (suitable eventually for use in tcpdump, hopefully)Luke Leighton1-20/+25
(This used to be commit 946d73cf838976b905550288cac3aea7c43959f6)
1997-10-12remove { and } from the list of illegal characters in filenames. TheAndrew Tridgell1-1/+1
CIFS3 spec does not list them as illegal. This allows things like the control panel icon to be placed on a Samba drive. (This used to be commit d2ac9e6fb6e76778154c58217237251d7bb0e98c)
1997-10-10added api_lsa_sam_logon() and api_sam_logoff(). that's it. lots ofLuke Leighton1-170/+216
run-time debugging, now. (This used to be commit 75f32987d8599d10b294dc4e0c0160eecda7296b)