summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile:Luke Leighton1997-10-104-71/+1126
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* nmblookup.c: Added -A ability to do status on ip address.Jeremy Allison1997-10-101-1/+21
| | | | | | | | smb.h: Added defines we will need for NT SMB calls. trans2.c: Fixed SMB_QUERY_FILE_ALT_NAME_INFO return - this is only for short name returns (and only used when you negotiate NT SMB calls to boot !). Jeremy (jallison@whistle.com)
* local.h: Fix spelling mistake :-).Jeremy Allison1997-10-093-4/+11
| | | | | | | | namedbsubnet.c: Stop registering 1x name unless we can be a local master. reply.c: Remove ERRbaddirectory code. server.c: Remove abort() - use exit_server() instead. trans2.c: Remove ERRbaddirectory code. Jeremy (jallison@whistle.com)
* added #ifdef NTDOMAIN. added call to api_ntLsarpc instead of api_LsarpcLuke Leighton1997-10-092-981/+7
| | | | in ipc.c iff NTDOMAIN is defined.
* pipes.c:Luke Leighton1997-10-091-82/+1093
| | | | | | | | added api_ntlsarpcTNP() function. hooray! smb.h: added LSA #defines needed by above function.
* credentials.c:Luke Leighton1997-10-091-1/+189
| | | | | | | | | | | | | | | | | | | | | | use UTIME structure (defined and commented in smb.h to be time, secs, since 01jan1970) pipes.c: another sub-function. util.c: added char *unistr2(uint16 *buff) function. same as unistr except it takes uint16* instead of char*. smbparse.c smb.h: more structure sorting. proto.h: the usual.
* bracket some macrosAndrew Tridgell1997-10-092-5/+9
| | | | | | | | change MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some systems add #ifdef around soft link dependent code (for systems that don't have soft links)
* Put in fix for read-prediction extending files bug. Hard to test, can'tJeremy Allison1997-10-081-13/+26
| | | | | get read-prediction to happen :-). Jeremy (jallison@whistle.com)
* added a dummy function (space in front so make proto doesn't pick it up)Luke Leighton1997-10-081-1008/+20
| | | | | | to call the unused static functions in pipes.c. avoids need to move #if UNDEFINED_NTDOMAIN about, to stop compiler warnings while code is being developed, but might be released as-is.
* Makefile: Split definitions for SGI4,5,6.Jeremy Allison1997-10-083-4/+165
| | | | | | | | includes.h: Split definitions for SGI4,5,6. pipes.c: Moved Luke's #ifdef to remove warnings. quotas.c: Two changes for FreeBSD and SGI. server.c: Quota changes for large filesystems. Jeremy (jallison@whistle.com)
* added api_lsa_lookup_sids() functionLuke Leighton1997-10-081-3/+1071
|
* loadparm.c proto.h:Luke Leighton1997-10-081-2/+138
| | | | | | | | | | | | added lp_domainsid() lsaparse.c smb.h: debugging structures and parsing functions pipes.c: finally got to the functions that will go into the RPC switch statement.
* updating lsaparse.c and smbparse.c in line with changes to pipes.c and smb.hLuke Leighton1997-10-081-4/+0
| | | | from yesterday.
* ipc.c: Added ERROR_MORE_DATA error if client buffer too small.Jeremy Allison1997-10-082-3/+12
| | | | | | server.c: Allow admin_user on read only shares. I think this is safe but it needs looking at. Jeremy (jallison@whistle.com)
* locking.c: Added fix for race condition in slow share mode code.Jeremy Allison1997-10-072-0/+33
| | | | | | | | | lsaparse.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS. pipes.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS. server.c: Fixed last known oplock race condition. smb.h: Re-removed USE_OPLOCK defines - someone checked in an old version. smbparse.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS. Jeremy (jallison@whistle.com)
* pipes.c:Luke Leighton1997-10-071-18/+182
| | | | | | | | | | | | more static unused functions in pipes.c for the LSA RPC stream. smb.h: corrections and altercations over the documentation lsaparse.c: reflecting alterations in LSA structures...
* pipes.c:Luke Leighton1997-10-071-1/+237
| | | | | | | | | | some routines to create LSA RPC packets. none of them are used. lsaparse.c: smbparse.c: smb.h: more tidy-up.
* client.c: Changed shadowed variable.Jeremy Allison1997-10-062-31/+1
| | | | | | | | | | | | | locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com)
* fix some "shadows global" errors.Andrew Tridgell1997-10-041-4/+4
|
* Race condition with multiple oplock break requests happensJeremy Allison1997-10-041-3/+2
| | | | | | | more often than you might think (reproduced here with 4 clients and netbench :-). Raising debug log level for report from 1 to 3. Jeremy (jallison@whistle.com)
* locking.c: Fixed incorrect parameter count in debug statements. May explainJeremy Allison1997-10-033-62/+63
| | | | | | | | | | | | | | | | | | solaris crashes. reply.c: Added NT specific error code. Put oplock break code in correct place in reply_lockingX. server.c: Removed unneeded error mapping stuff. Fixed race condition in oplock code. trans2.c: Added NT specific error code. util.c: Added paranoia check in interpret_addr. Some core dumps reported here. Upped fcntl debug levels. Andrew. Please check the NT specific error code handling (search for the string "/* Ugly - NT specific hack - but needed (JRA) */", this makes NT and 95 clients behave correctly here - please check your Visual Basic apps with this code. Jeremy (jallison@whistle.com).
* add "static" to a couple of functions that are only used locally.Andrew Tridgell1997-10-031-7/+6
| | | | | set granted_oplock=False at the start of open_file(). This is paranoia.
* proto.h: Updated.Jeremy Allison1997-10-032-29/+47
| | | | | | | | | | server.c: Updated after netbench observation. Oplocks must be broken *before* share modes are checked, not after. Netbench seems to be working now. smb.h: Added offsets for oplock break time fields. trans2.c: Upped debug messages. util.c: Upped debug messages. Jeremy (jallison@whistle.com)
* change a debug level in reply.cAndrew Tridgell1997-10-022-2/+2
| | | | | | | | | | | | change from ERRbaddirectory to ERRbadpath for ENOTDIR errors. This reverts to the old Samba code. I've done quite a bit of testing against NT4 and have yet to get it to produce the ERRbaddirectory error code. Producing ERRbaddirectory made a visual basic application that was sent to me not run. This might explain some of the "it doesn't work any more" complaints we've got about 1.9.17. Jeremy, can you remember how you got NT to produce ERRbaddirectory? There might be some specific circumstances we need to cover.
* Added debug message for oplock_break().Jeremy Allison1997-10-021-1/+7
| | | | Jeremy (jallison@whistle.com)
* change the semantics of hosts allow/hosts deny so that a globalAndrew Tridgell1997-10-021-4/+19
| | | | | | | | | | | | | | | | | | | | | | | setting applies to all shares regardless of any settings on other shares. This allows us to immediately drop a connection if it does not come from a allowed host, without even parsing the first SMB packet. The next time we get a nasty security hole we can offer people the option of just setting their hosts allow line. If we drop a connection in this way we generate a "Not listening for calling name" response and then exit. add a per share "oplocks" option in smb.conf. I think its important to be able to disable oplocks on a per-share basis as there are occasions then they are definately not wanted, for example when sharing data between a windows box and a unix application. This also allows us to tell people "try disabling oplocks" when diagnosing problems. fix a bug in process_smb(). It was taking the length of the packet from outbuf, not inbuf (this bug was introduced with the oplocks code). Jeremy, I assume this wasn't deliberate?
* Modified some debug messages, moved from 5 -> 8.Jeremy Allison1997-10-021-8/+8
| | | | Jeremy (jallison@whistle.com)
* Fixed problem with oplock_type being set with no port.Jeremy Allison1997-10-021-2/+10
| | | | Jeremy (jallison@whistle.com)
* OPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!!Jeremy Allison1997-10-012-30/+226
| | | | | | | | | | | | | | | Yipeee. At least as far as I can check in a short time :-). local.h: Changed OPLOCK_BREAK_TIMEOUT to 30 seconds. locking.c: Big changes to delete oplocks on a share mode entry. proto.h: updated. reply.c: Added oplock break code in lockingX reply & readbraw reply. server.c: Add batch oplock code. Force server shutdown if client fails to respond to oplock break. smb.h: Fix silly slow share mode oplock define bug. status.c: Add oplock status info. Jeremy (jallison@whistle.com)
* dir.c: more pstrcpys.Jeremy Allison1997-09-304-97/+421
| | | | | | | | | | | local.h: Add OPLOCK_BREAK_TIMEOUT. password.c: Fix for paranoia password server security bug. proto.h: Updated. reply.c: Oplock changes. server.c: Massive oplock changes - nearly there.... smb.h: oplock definitions. util.c: Add local message processing queues for oplocks. Jeremy (jallison@whistle.com)
* Fixed you're -> your text that some pedant complained about :-).Jeremy Allison1997-09-261-1/+1
| | | | Jeremy (jallison@whistle.com).
* Syncing up current oplock work in progress. #ifdef'ed outJeremy Allison1997-09-264-119/+195
| | | | | so should have no effect on other work. Jeremy (jallison@whistle.com)
* Adding Andrews buffer overflow fixes into the main branch.Jeremy Allison1997-09-2610-139/+181
| | | | Jeremy (jallison@whistle.com)
* Makefile: Removed earlier errors.Jeremy Allison1997-09-251-58/+65
| | | | | | | | | | | includes.h: Added INADDR_LOOPBACK define. locking.c: More code to support oplocks. proto.h: Updated. server.c: More code to support oplocks. Moved processing of an SMB out of process() into a separate function so it is easier to call from an oplock break. smb.h: Added oplock fields. Jeremy (jallison@whistle.com)
* Checkin to sync up oplock development code so that NTJeremy Allison1997-09-233-91/+219
| | | | | | | | | | | | | domain development code won't diverge. Makefile: Fixed make proto (again). Added GLIBC2 fixes for Linux. includes.h: Added GLIBC2 fixes for Linux. proto.h: Much tidier. quotas.c: OSF/1 quota fix. reply.c: Fix from Ray Frush <frush@engr.colostate.edu> for zero NT timestamps. server.c util.c: First oplock checkin - nowhere near finished so bracketed with #ifdef USE_OPLOCKS. Done to make sync with NT domain code easier. Jeremy (jallison@whistle.com)
* added some debug stuffAndrew Tridgell1997-09-181-51/+64
|
* JHT ===> Changed behaviour of logon script processing so that all macrosJohn Terpstra1997-09-171-1/+9
| | | | | | | | can be used in the logon script parameter definition in the smb.conf Globals section. This fixes a problem reported by Jacco de Leeuw where OS/2 does not see the %u variable. Jacco suggested using %U but we really do want the user for the netlogon share session. If this does not do the trick - well we eat our hat! Yeh!
* Added 'delete veto files' paremeter. Ugly - but the onlyJeremy Allison1997-09-171-1/+66
| | | | | | | | | way to allow Samba client users to delete directories containing Mac metafile information (.AppleDouble directories). Needed for clean integration with netatalk. Jeremy (jallison@whistle.com)
* add a castAndrew Tridgell1997-09-161-1/+1
|
* - change generate_challenge() to use md4 instead of desAndrew Tridgell1997-09-161-11/+18
| | | | | | | | | | | | | | | | | | | | | | | - move routines about a bit between smbencrypt.c and smbdes.c. Ensure that there is no entry point for normal DES operation - add the following comment: This code is NOT a complete DES implementation. It implements only the minimum necessary for SMB authentication, as used by all SMB products (including every copy of Microsoft Windows95 ever sold) In particular, it can only do a unchained forward DES pass. This means it is not possible to use this code for encryption/decryption of data, instead it is only useful as a "hash" algorithm. There is no entry point into this code that allows normal DES operation. I believe this means that this code does not come under ITAR regulations but this is NOT a legal opinion. If you are concerned about the applicability of ITAR regulations to this code then you should confirm it for yourself (and maybe let me know if you come up with a different answer to the one above)
* This commit does 3 main things:Andrew Tridgell1997-09-143-35/+10
| | | | | | | | | | | | | | | | | | | | | | | 1) put the encryption code in by default, with no #ifdef. It is still disabled by default so you need to add "encrypt passwords = yes" in smb.conf but at least all binaries will have it. 2) cleanup the kanji code so it compiles with no warnings 3) get rid of lots of uses of ugly non-portable C code. The main offender being things like "register" but also remove uses of the "const" keyword as there are compilers out there that don't support it and even those that do often complain about its usage. Users don't like warnings :-( There is still some work to do. We need to replace the md4 code with our own implementation. The current code (from rfc1186) is PD but is not very portable. The new RFC (rfc1320) is more portable but adds copyright restrictions. I'll do a from-scratch MD4 soon. We also need to test that what I've implemented is portable. It should be, but I'm too tired right now to test it on anything other than intel linux.
* Added fix that means if connecting user sends guest accountJeremy Allison1997-09-121-1/+8
| | | | | | | with no password they are seen as guest. Previous patch broke this. Jeremy (jallison@whistle.com)
* charcnv.c client.c clitar.c kanji.c kanji.h loadparm.cJeremy Allison1997-09-112-96/+117
| | | | | | | | | | | | | | mangle.c smb.h util.c: Big merge to allow KANJI support to be in the main binary without explicitly compiling with it. locking.c: Fix for smbstatus not being able to read files. namepacket.c: Removed unneccesary debug statement. trans2.c: Added Luke's proposed fix (ifdefed out until further testing). nmblookup.c: Fixed bug where query fails and status is done on bogus IP. Jeremy (jallison@whistle.com)
* client.c: Made sure myhostname was initialised before substitutions.Jeremy Allison1997-09-052-4/+6
| | | | | | | status.c: Made sure myhostname was initialised before substitutions. server.c trans2.c: Moved OS/2 WPS fix. Jeremy (jallison@whistle.com)
* Fix from Frank Varnavas <varnavas@ny.ubs.com>.Jeremy Allison1997-09-041-3/+17
| | | | | | | | | We cannot use the same name as the client to the NT password server, as NT will drop client connections if the same client name connects twice. Instead, synthesize a name from our pid. and the remote machine name. Jeremy (jallison@whistle.com)
* Fixed up determination of client type for PROTOCOL_NT1. Uses clientJeremy Allison1997-09-042-12/+26
| | | | | | capabilities bits in session_setup_and_X to decide. Made remote_arch an enum as well as a string, for easier use. Jeremy (jallison@whistle.com)
* nameannounce.cJeremy Allison1997-09-031-2/+14
| | | | | | | | | | | | | | | | nameresp.c nameserv.c nameservreply.c proto.h : Removed broadcast and recurse parameters in the queue_netbios_pkt_wins() call - they are not needed as they should always be 'false' and 'true' respectively. Also fixed a bug with secure name registration (WINS server code). server.c: Finally fixed problem with error 267 being returned to Win95. It is needed by NT. This is a horrid fix and I would appreciate a better one :-). Jeremy (jallison@whistle.com)
* reply.c: Removed unused variables. Caught by gcc -Wall -WerrorJeremy Allison1997-09-022-7/+29
| | | | | | server.c: Fix for old DOS clients not understanding ERRbaddirectory - map to ERRbadpath. util.c: Fix for systems with no LOG_DAEMON facility. Jeremy (jallison@whistle.com)
* added word count 3 support into reply_tcon_and_X (see cifs6.txt). theLuke Leighton1997-08-311-3/+23
| | | | | only thing i couldn't do was get the chaining word count to point to the end of the smb reply, for the next and_X (not that there is one).
* fixed a bug in the printjob encoding/decoding. We weren't doing it forAndrew Tridgell1997-08-312-15/+12
| | | | | | | | | | | | | | the print_ functions in reply.c, with the effect that you couldn't cancel print jobs from smbclient or from older dos clients. we now use a couple of utility functions printjob_encode() and printjob_decode() rather than sticking the bitops inline in each place. also fixed a bunch of places that used foo%0xFF rather than foo&0xFF Note that this isn't really me doing the commit, it can't be as I'm working on my thesis ...