summaryrefslogtreecommitdiffstats
path: root/source/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* added NEGNOWAIT. sent to secure@microsoft.comLuke Leighton2000-09-261-0/+38
|
* Replaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.Tim Potter2000-08-251-1/+1
|
* First shot at actually *doing* WINS failover.Christopher R. Hertel2000-08-111-1/+8
| | | | | | | | | | | | | | | | | | If libsmb/namequery.c:name_query() times out while doing a non-broadcast query, I mark that WINS server 'dead'. Note that I don't try the new WINS server. I think I can get that working too. This is only for queries, not registrations. The biggest problem is that I may have to fiddle with the UNICAST SUBNET, but I need to check talk that over with someone (Jeremy?) before I hack at it. I can't actually test the above change, I'm 'fraid. I'm getting: 4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c". in head branch. Chris -)-----
* In cli_error() return ENOENT when an ERROR_INVALID_NAME is received insteadTim Potter2000-08-041-0/+1
| | | | of the generic EINVAL.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-012-3/+4
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
* Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel2000-07-191-1/+1
| | | | | | | | | | | | | | | | | | string), the wins_srv module now hands back a struct in_addr when it's called. It caches the IP address once it has been looked up. The IP is cleared (and must be looked up again) if the 'wins server' parameter is reread, or if the node is marked 'dead'. A dead node will not be re-tried for 10 minutes (per a #define in wins_srv.c). As it was, the code was reading the WINS server name or IP directly from lp_wins_server. That's okay, except that if the value was expressed as a name, then a DNS lookup would be done every time the client wanted to talk to the server. I still need to work out the implications of failover regarding the 'unicast subnet' list. Chris -)-----
* First cut toward adding WINS server failover.Christopher R. Hertel2000-07-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | *Note: failover doesn't actually work yet!* It's just that the code I'm adding provides all of the pieces necessary. I do have one big question. Something that I'll have to ask Jeremy, I'm thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to set up the Unicast subnet. ...so what happens if the WINS server changes? My guess is either: a) nothing. b) I'd have to change the unicast subnet entry whenever the WINS server changes. Urq. BTW, the lp_wins_server() function no longer returns the WINS server name or IP. It returns the list of WINS servers entered in smb.conf. To get the currently 'live' WINS server, use the wins_srv() function. Fun, eh? Chris -)-----
* An improved version of the Negative Query Response fix. The earlier fixChristopher R. Hertel2000-07-121-10/+37
| | | | | | | | only did a short-cut on an rcode of 3, which is 'name not found'. This does a short-cut on any non-zero rcode. It also puts out a DEBUG message (if DEBUGLEVEL is >= 3) detailing the error. Chris -)-----
* Quick change to short-circuit WINS queries if the WINS server returns aChristopher R. Hertel2000-07-091-6/+20
| | | | | Negative Name Query Response. We should't wait through the timeouts and retry twice if we've been told "No Such Entry".
* More rpcclient merge issues:Gerald Carter2000-07-071-2/+12
| | | | | | | | | | | | * fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-034-6/+105
| | | | | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. These files changed only with the addition of some support functions from TNG --jerry
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-1/+1
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-2/+2
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* lib/util_unistr.c:Jeremy Allison2000-05-102-49/+1
| | | | | | | | | | libsmb/clilist.c: rpc_server/srv_spoolss_nt.c: smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion. msdfs/msdfs.c: Removed stub unistr_to_dos. libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and don't add any security. Jeremy.
* Ho hum - forgot timeout case.Jeremy Allison2000-05-101-1/+5
| | | | Jeremy.
* Fix from David Collier-Brown - sys_select return was not being checked.Jeremy Allison2000-05-101-1/+5
| | | | Jeremy.
* more mergingAndrew Tridgell2000-05-102-4/+2
| | | | | it is now at the stage that winbindd can compile in the head branch, but not link
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-022-2/+2
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* - added some error checkingAndrew Tridgell2000-04-301-64/+66
| | | | - removed the VTP hook in smbd
* fixed parsing of broken NT short nameAndrew Tridgell2000-04-301-1/+1
|
* - get the findclose code rightAndrew Tridgell2000-04-301-9/+17
| | | | - handle broken NT response to trans2 findfirst
* added cli_list_old() to allow for old style directory listing fromAndrew Tridgell2000-04-301-2/+144
| | | | masktest
* YIPEE!!!!!Andrew Tridgell2000-04-301-0/+1
| | | | | | | | | | | We finally have a perfect emulation of Microsoft wildcard matching. The routine ms_fnmatch() does wildcard matching with all MS wildcards (including the unicode wildcards), and masktest against a NT4 workstation with hundreds of thousands of random exmaples has not found a single error. amazingly it is only about 60 lines of code, but it has taken us years to get it right. I didn't sleep much last night :)
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-1/+0
|
* split clientgen.c into several partsAndrew Tridgell2000-04-2510-3061/+3295
| | | | | the next step is splitting out the auth code, to make adding lukes NTLMSSP support easier
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-1/+1
| | | | | | | | | | | | include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-7/+16
| | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
* changed the definition of dos_PutUniCodeAndrew Tridgell2000-03-271-2/+1
| | | | | | | | | the previous definition could result is us overflowing a buffer. The null termination was always added yet the size returned did not include the null termination. the new function takes a BOOL null_terminate, and always returns the total number of bytes consumed by the string.
* moved nmblib-specific code from util.c to nmblib.c.Luke Leighton2000-03-271-9/+203
|
* Fix from christoph.pfisterer@rwg.de for large directory listing to OS/2Jeremy Allison2000-03-201-2/+2
| | | | | server. Jeremy.
* client/client.c:Jeremy Allison2000-02-251-3/+7
| | | | | | | libsmb/clientgen.c: Fixes for Win2k smbclient browsing. Other fixes implement smbpasswd -x user to delete users. Also allows swat to do the same. Jeremy.
* Multiple-dot scope handling fix from Greg Bowering gb@pobox.comJeremy Allison2000-02-231-2/+2
| | | | Jeremy.
* lib/system.c: Fixed gcc warnings.Jeremy Allison2000-02-231-2/+2
| | | | | | nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0. Others - preparing for multiple pdu write code. Jeremy.
* Not enough args to DEBUG statement.Tim Potter2000-02-151-1/+1
|
* Ooops. Fixed stupid typo with missing ! in cli error code.Jeremy Allison2000-02-141-1/+1
| | | | Jeremy.
* Correct for for core dump in smbpasswd with cli_errstr().Jeremy Allison2000-02-091-8/+22
| | | | Jeremy.<F4>plit the test for NetBIOS name being *SMBSERVER.
* Defensive programming for cli_error().Jeremy Allison2000-02-091-1/+7
| | | | Jeremy.
* 1) added void* state argument to tdb_traverse. guess what! there wereLuke Leighton2000-02-041-10/+10
| | | | | | | | | | | | | | | | | | two places i found where it was appropriate to _use_ that third argument, in locking.c and brlock.c! there was a static traverse_function and i removed the static variable, typecast it to a void*, passed it to tdb_traverse and re-cast it back to the traverse_function inside the tdb_traverse function. this makes the use of tdb_traverse() reentrant, which is never going to happen, i know, i just don't like to see statics lying about when there's no need for them. as i had to do in samba-tng, all uses of tdb_traverse modified to take the new void* state argument. 2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient. i don't know how the other samba team members would react if i deleted rpcclient from cvs main. damn, that code's so old, it's unreal. 20 rpcclient commands, instead of about 70 in SAMBA_TNG.
* fixed a formatting errorAndrew Tridgell2000-01-161-1/+1
|
* damn, Solaris already has a "enum lock_type"Andrew Tridgell2000-01-141-1/+1
| | | | changed it to "enum brl_type"
* we now pass all byte range locking testsAndrew Tridgell2000-01-141-4/+3
| | | | | the last piece was to use a smb timeout slightly larger than the locking timeout in bloking locks to prevent a race
* the lock routines now take a enumerated type for read/write locks, andAndrew Tridgell2000-01-131-4/+4
| | | | | | | | we now don't pass the lock type at all for unlocks. I was surprised to discover that NT totally ignores the lock type in unlocks. It unlocks a matching write lock if there is one, otherwise it removes the first matching read lock.
* I'm currently designing a new locking system (using a tdb database!)Andrew Tridgell2000-01-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that will make us match NT semantics exactly and do away with the horrible fd multiplexing in smbd. this is some diag stuff to get me started. - added the ability to do read or write locks in clientgen.c - added a LOCK4 test to smbtorture. This produces a report on the server and its locking capabilities. For example, NT4 gives this: the same process cannot set overlapping write locks the same process can set overlapping read locks a different connection cannot set overlapping write locks a different connection can set overlapping read locks a different pid cannot set overlapping write locks a different pid can set overlapping read locks the same process can set the same read lock twice the same process cannot set the same write lock twice the same process cannot override a read lock with a write lock the same process can override a write lock with a read lock a different pid cannot override a write lock with a read lock the same process cannot coalesce read locks this server does strict write locking this server does strict read locking whereas Samba currently gives this: the same process can set overlapping write locks the same process can set overlapping read locks a different connection cannot set overlapping write locks a different connection can set overlapping read locks a different pid can set overlapping write locks a different pid can set overlapping read locks the same process can set the same read lock twice the same process can set the same write lock twice the same process can override a read lock with a write lock the same process can override a write lock with a read lock a different pid can override a write lock with a read lock the same process can coalesce read locks this server does strict write locking this server does strict read locking win95 gives this - I don't understand why! the same process cannot set overlapping write locks the same process cannot set overlapping read locks a different connection cannot set overlapping write locks a different connection cannot set overlapping read locks a different pid cannot set overlapping write locks a different pid cannot set overlapping read locks the same process cannot set the same read lock twice the same process cannot set the same write lock twice the same process cannot override a read lock with a write lock the same process cannot override a write lock with a read lock a different pid cannot override a write lock with a read lock the same process cannot coalesce read locks this server does strict write locking this server does strict read locking
* don't treat a packet as a oplock break unless it is a request, not aAndrew Tridgell2000-01-101-1/+2
| | | | reply!
* cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.Andrew Tridgell2000-01-081-6/+5
| | | | | | After fixing that I needed to use O_RDWR instead of O_WRONLY in several places to avoid the silly bug in MS servers that doesn't allow getattrE on a file opened with O_WRONLY
* fixed a commentAndrew Tridgell2000-01-071-1/+1
|
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-074-15/+13
| | | | | | | | This fixes our netbios scope handling. We now have a 'netbios scope' option in smb.conf and the scope option is removed from make_nmb_name() this was prompted by a bug in our PDC finding code where it didn't append the scope to the query of the '*' name.
* Fix for renaming directories on OS/2 server. Fix from John Janosik ↵Jeremy Allison2000-01-061-1/+1
| | | | | | <jpjanosi@us.ibm.com>. Jeremy.
* use a minimal hash size in the unexpected packet database. A largeAndrew Tridgell2000-01-051-1/+1
| | | | | hash is only useful when we fetch by key, not when we use tdb_traverse()