summaryrefslogtreecommitdiffstats
path: root/source/libsmb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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()
* simple mods to add msrpc pipe redirection. default behaviour: fall backLuke Leighton2000-01-031-0/+54
| | | | to using internal msrpc code in smbd.
* added suppport for unexpected udp/138 packetsAndrew Tridgell2000-01-033-247/+225
| | | | | | | | | | | | | | I also fixed up the lookup_pdc_name() code so that it now works, even with a NT server that insists on replying to udp/138. The method I used to match packets was to use the mailslot string as a datagram ID. The true dgm_id doesn't work as NT doesn't set it correctly. uggh. PS: Jeremy, I had to change your code quite a bit, are you sure this worked with a Samba PDC?? The code looked broken, it got the offsets wrong in the SMB portion of the packet and filled in the IP incorrectly.
* the bulk of the unexpected packet handling code is in hereAndrew Tridgell2000-01-031-0/+160
|
* added the unexpected packet database (unexpected.tdb)Andrew Tridgell2000-01-032-208/+223
| | | | | | | | | | | | this means "nmblookup -S" now always works, even with broken servers the database stores all unexpected replies and these can be accessed by any client. while doing this I cleaned up a couple of functions, and put in place a better trn_id generator. in most places the code got quite a bit simpler due to the addition of simple helper functions. I haven't yet put the code in to take advantage of this for pdc replies - that will be next. Jeremys pdc finding code will then work :)
* 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1999-12-131-127/+0
| | | | that were in the head branch but weren't in SAMBA_2_0
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-139-2426/+1411
|
* final part of "first" phase converting over to msrpc daemon architecture.Luke Leighton1999-12-121-4/+2
| | | | | | | | | | | | done a minimal amout of clean-up in the Makefile, removing unnecessary modules from the link stage. this is not complete, yet, and will involve some changes, for example to smbd, to remove dependencies on the password database API that shouldn't be there. for example, smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa API. this first implementation has minor problems with not reinstantiating the same services as the caller. the "homes" service is a good example.
* delineation between smb and msrpc more marked. smbd now constructsLuke Leighton1999-12-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pdus, and then feeds them over either a "local" function call or a "remote" function call to an msrpc service. the "remote" msrpc daemon, on the other side of a unix socket, then calls the same "local" function that smbd would, if the msrpc service were being run from inside smbd. this allows a transition from local msrpc services (inside the same smbd process) to remote (over a unix socket). removed reference to pipes_struct in msrpc services. all msrpc processing functions take rpcsrv_struct which is a structure containing state info for the msrpc functions to decode and create pdus. created become_vuser() which does everything not related to connection_struct that become_user() does. removed, as best i could, connection_struct dependencies from the nt spoolss printing code. todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific info on a per-connection basis, and if the connection dies then so does the info, and that's a fairly serious problem. had to put pretty much everything that is in user_struct into parse_creds.c to feed unix user info over to the msrpc daemons. why? because it's expensive to do unix password/group database lookups, and it's definitely expensive to do nt user profile lookups, not to mention pretty difficult and if you did either of these it would introduce a complication / unnecessary interdependency. so, send uid/gid/num_groups/gid_t* + SID+num_rids+domain_group_rids* + unix username + nt username + nt domain + user session key etc. this is the MINIMUM info identified so far that's actually implemented. missing bits include the called and calling netbios names etc. (basically, anything that can be loaded into standard_sub() and standard_sub_basic()...)
* OK. This code works on a RedHat 6.0 system. However smbpasswdGerald Carter1999-12-091-2/+4
| | | | | | | | | | | | | | | | | time out of sending the session setup on Solaris 2.6. No idea. I'll work on it some tomorrow. This is to fix the "Unable to setup password vectors" thingy. Also changed an inet_aton() to inet_addr() as the former is not very portable :-) Luke, I set the redir flag to false because the connection to the smb-agent was failing and smbpasswd bombed. Double check me on this one. -jc
* ABOUT TIME!!!!!!!!Luke Leighton1999-12-081-56/+20
| | | | | | | | | | | | | | | damn, this one is bad. started, at least two days ago, to add an authentication mechanism to the smbd<->msrpc redirector/relay, such that sufficient unix / nt information could be transferred across the unix socket to do a become_user() on the other side of the socket. it is necessary that the msrpc daemon inherit the same unix and nt credentials as the smbd process from which it was spawned, until such time as the msrpc daemon receives an authentication request of its own, whereupon the msrpc daemon is responsible for authenticating the new credentials and doing yet another become_user() etc sequence.
* reenabled retry_time (commented out accidentally in name_status)Luke Leighton1999-12-051-1/+1
|
* argh! how horrible! spent ages working out why packets weren't beingLuke Leighton1999-12-042-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | received properly when a UDP "retry" occurs. it's because reads and writes must be interleaved / matched. scenario: nmblookup connects to agent, sends request. agent receives request, broadcasts it on 137. agent RECEIVES 137 broadcast, sends it to nmblookup agent receives RESPONSE to 137 broadcast, sends it to nmblookup. if reads are not equally interspersed with writes, then second send will fail. if you think this is odd behaviour and that the agent should be filtering its own UDP traffic, think again. agent will be, potentially, redirecting nmbd traffic (including WINS server) not just client programs.
* argh. trying to get the nmb agent code to filter out "self" packets.Luke Leighton1999-12-041-9/+3
|
* jeremy is going to hate me for this.Luke Leighton1999-12-043-39/+205
| | | | | | | | | | | created an "nmb-agent" utility that, yes: it connects to the 137 socket and accepts unix socket connections which it redirects onto port 137. it uses the name_trn_id field to filter requests to the correct location. name_query() and name_status() are the first victims to use this feature (by specifying a file descriptor of -1).
* argh! you wouldn't believe what i had to do: use the mid (multiplex id)Luke Leighton1999-12-041-1/+1
| | | | | | to redirect multiple socket-based connnections onto a single client state. argh!
* argh! smb-agent redirection client reusage is a nightmare!Luke Leighton1999-12-032-3/+16
| | | | | | moved smb-agent over to a single-process model instead of fork() in order to reuse client connections. except, of course, you can't do a select() on the same socket connections! argh!
* starting "connection reuse" system in smb-agent. added version numberLuke Leighton1999-12-031-0/+20
| | | | which isn't actually used right now :-)
* smb-agent improvements. added -D (daemon) option. smb agent isLuke Leighton1999-12-031-2/+4
| | | | | restricted to connections from the current user (socket is created with current user uid).
* cool! a unix socket smb redirector. code based on smbfilter andLuke Leighton1999-12-032-0/+119
| | | | | | | | ideas from ssh-agent. the intent is to be able to share smb sessions using cli_net_use_add() across multiple processes, where one process knows the target server name, user name and domain, but not the smb password.
* new get_any_dc_name() function allows lookups of trusted domains fromLuke Leighton1999-12-021-15/+14
| | | | | | | | | | | | | | | lp_trusted_domains() parameter, so trusted domain logins should work, right, if you put user = TRUSTED_DOMAIN\NTuser in "domain name map", right? right - as _long_ as you're not using NTLMv2, because the damn NT username gets mapped to the damn unix name too early, and NTLMv2 challenge-responses are based on the client's user name, client's domain name, client's host name etc damn etc. so it becomes necessary to stop using char* username because this allows for massive amounts of confusion as to which username is being referred to. the underlying unix username on the local unix system that is associated with the smbd process that represents the NT username? or the NT username itself?
* cleaning up: removing those horrible references to server listLuke Leighton1999-12-021-2/+1
| | | | | functions (cli_net_use_addlist()). needed originally because there was no get_dc_any_name() function.
* added get_any_dc_name() function.Luke Leighton1999-12-021-32/+122
|
* default SID map now reads in "trusted domains" from smb.conf.Luke Leighton1999-12-021-3/+5
|
* clearing up connection-related stuff. password credentials were messingLuke Leighton1999-12-021-9/+1
| | | | | | | up. added a complicated prompt which i don't like, but it tells you domain\user@hostname$
* more cli_session_setup() calls. what the heck are these doing???Luke Leighton1999-12-011-1/+1
| | | | | | | they should all be replaced with cli_establish_connection(). created cli_use_wait_keyboard() which waits on multiple cli_states and swallows session keepalives.
* 1) when no domain used in ntlogin test command, should use default oneLuke Leighton1999-12-012-20/+79
| | | | | | | | | | | | | | from previous lsaquery command. over-ridden from DOMAIN\username 2) initialisation of cli_state is a little more specific: sets use_ntlmv2 to Auto. this can always be over-ridden. 3) fixed reusage of ntlmssp_cli_flgs which was being a pain 4) added pwd_compare() function then fixed bug in cli_use where NULL domain name was making connections multiply unfruitfully 5) type-casting of mallocs and Reallocs that cause ansi-c compilers to bitch
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-013-105/+71
|
* this is going to sound _really_ weird, ok, but i had to implementLuke Leighton1999-11-291-3/+3
| | | | equivalents of NetUseAdd and NetUseDel!
* attempting to resolve the issue that multiple servers often specified inLuke Leighton1999-11-291-1/+2
| | | | parameters to connect to \PIPE\NETLOGON.
* first attempt at getting \PIPE\NETLOGON working. it's pretty horrible.Luke Leighton1999-11-291-96/+12
|
* updated \PIPE\wkssvc commands to use new abstracted connection system.Luke Leighton1999-11-271-8/+26
| | | | | modified resolve_srv_name() to return dest host of *SMBSERVER if server name is \\ip.add.ress.format
* modified cli_connect_serverlist to take server list of formatLuke Leighton1999-11-271-5/+6
| | | | \\server_name \\other_server etc.
* whoa. _major_ restructure of rpcclient. fixed some buuugs, created a few.Luke Leighton1999-11-261-0/+24
| | | | | | found out that getopt() _must_ have optind set to 0 before reuse. still haven't decided what to do with the net* api yet...