summaryrefslogtreecommitdiffstats
path: root/source/nmbd
Commit message (Collapse)AuthorAgeFilesLines
...
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-0715-63/+38
| | | | | | | | 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.
* implemented talloc() as described on samba-technical. This fixes theAndrew Tridgell2000-01-051-0/+3
| | | | | | | lp_string() bug properly. we still need to add lp_talloc_free() calls in all the main event loops, I've only put it in smbd and nmbd thus far.
* added suppport for unexpected udp/138 packetsAndrew Tridgell2000-01-031-9/+12
| | | | | | | | | | | | | | 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.
* got rid of mem_manAndrew Tridgell2000-01-031-2/+0
| | | | | | | yamd is much better, and doesn't require any source code changes if you haven't seen yamd then take a look at http://www3.hmc.edu/~neldredge/yamd/ its excellent!
* added the unexpected packet database (unexpected.tdb)Andrew Tridgell2000-01-032-1/+7
| | | | | | | | | | | | 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 :)
* - added tdb_flags option to tdb_open()Andrew Tridgell2000-01-022-16/+4
| | | | | | | | | - added TDB_CLEAR_IF_FIRST flag to clear the database if this is the first attached process. Useful for non-persistent databases like our locking area (this will also make upgrades to new database layouts easier) - use lock_path() in a couple of places - leave connections database open while smbd running - cleaned up some tdb code a little, using macros for constants
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-1322-261/+484
|
* 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.
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-011-1/+1
|
* - bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursionLuke Leighton1999-11-192-8/+19
| | | | | | | | desired flag MUST be set in any NBT UDP packets sent to a WINS server, else they will go to the WINS client side of the NT NetBIOS kernel instead, and will get trashed. - added \PIPE\browser server-side code.
* responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, theLuke Leighton1999-11-182-9/+9
| | | | | | | request name. modified createuser rpcclient command to examine name being added. if it ends in a $, assume that a workstation trust account is being added.
* added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1999-11-181-0/+2
| | | | | | | | reg_io_r_info() working properly. previously they weren't well understood (well, they were the first of the registry functions i did, back in december 97, ok??? :-) set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
* - added DCE/RPC "fault" PDU support.Luke Leighton1999-11-151-5/+21
| | | | | | | | | - disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get NT5rc2 to work but WILL break win95 (AGAIN). this needs _not_ to be re-enabled but to be replaced with a better mechanism. - added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is sending DCE/RPC over SMBwrite not SMBwriteX.
* Fix for Win95 not being able to find PDC (for User/Server Manager, andMatthew Chapman1999-08-081-11/+14
| | | | | | password change requests), from Michael Stockman <pgmtekn@algonet.se>. GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information than the NTLOGON version.
* Trying to improve DC location & browsing performance for the average userMatthew Chapman1999-04-112-5/+1
| | | | | | | | | | | | | | | | | | | who doesn't know what an LMB or DMB is. * check_master_browser_exists now performs the check the first time around, so if there is indeed no master browser then Samba takes up the job much faster. * Upped default OS level to 32. There is no reason why some stupid little Windows box should become LMB instead of a Samba *server*. * "domain master" now defaults to "auto". Currently this attempts to become DMB iff Samba is the PDC (ala Windows NT). "preferred master" also defaults to "auto", which enables preferred master iff Samba is DMB. * lp_server_role now just returns the predetermined role, rather than working it out each time, since the server role is becoming very heavily used (esp for the BDC code).
* SAMLOGON query - alignment issue is beginning to get to me.Luke Leighton1999-03-171-0/+2
|
* alignment issue for UDP SAMLOGON response.Luke Leighton1999-03-171-2/+2
|
* alignment issue in UDP SAMLOGON response.Luke Leighton1999-03-091-3/+6
|
* mods to allow inter-domain trust accounts to be added to SAM databaseLuke Leighton1999-03-091-51/+4
| | | | using smbpasswd command.
* oh dear, it's this one again. removed check for MAILSLOT\NTLOGON becauseLuke Leighton1999-03-091-14/+12
| | | | | | it's wrong. i've seen a packet from nt client on MAILSLOT\NETLOGON with appended undocumented unicode tacked on the end and the response contained undocumented unicode tacked on the end.
* Always null-terminate strings.Matthew Chapman1999-02-151-7/+7
| | | | Also some string length and sizeof(pointer) corrections.
* UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1999-02-121-20/+21
| | | | | | No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size).
* Fix bug with nmbd running wild due to recursion in ↵Jeremy Allison1998-12-172-9/+27
| | | | | | retransmit_or_expire_response_records(). Jeremy.
* oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.Luke Leighton1998-12-091-1/+1
|
* need to initialise global_myworkgroupLuke Leighton1998-12-091-0/+5
|
* removed the SID stuff from the head branch as well.Andrew Tridgell1998-12-092-35/+5
| | | | | | | This allows the removal of PASSDB_OBJ, RPC_CLIENT_OBJ and RPC_PARSE_OBJ from nmbd in the head branch. so nmbd just went on a diet :)
* jean-f spotted race condition on generation of sam sid, from startingLuke Leighton1998-12-031-1/+1
| | | | | nmbd and smbd. nmbd is now client: smbd is solely responsible for creating sam_name.SID
* rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton1998-12-011-1/+1
| | | | | | | | | | samr_query_aliasmembers (cool!) util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c : pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5) to obtain member and pdc sids.
* weekend work. user / group database API.Luke Leighton1998-11-291-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - split sam_passwd and smb_passwd into separate higher-order function tables - renamed struct smb_passwd's "smb_user" to "unix_user". added "nt_user" plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd password databases to fill in the blank entries that are not obtained from whatever password database API instance is being used. NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c for the only example outside of the password database APIs i could find. - added query_useraliases code to rpcclient. - dealt with some nasty interdependencies involving non-smbd programs and the password database API. this is still not satisfactorily resolved completelely, but it's the best i can do for now. - #ifdef'd out some password database options so that people don't mistakenly set them unless they recompile to _use_ those options. lots of debugging done, it's still not finished. the unix/NT uid/gid and user-rid/group-rid issues are better, but not perfect. the "BUILTIN" domain is still missing: users cannot be added to "BUILTIN" groups yet, as we only have an "alias" db API and a "group" db API but not "builtin-alias" db API...
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-174-6/+6
| | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy.
* - group database API. oops and oh dear, the threat has been carried out:Luke Leighton1998-11-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pre-alpha "domain group" etc parameters have disappeared. - interactive debug detection - re-added mem_man (andrew's memory management, detects memory corruption) - american spellings of "initialise" replaced with english spelling of "initialise". - started on "lookup_name()" and "lookup_sid()" functions. proper ones. - moved lots of functions around. created some modules of commonly used code. e.g the password file locking code, which is used in groupfile.c and aliasfile.c and smbpass.c - moved RID_TYPE_MASK up another bit. this is really unfortunate, but there is no other "fast" way to identify users from groups from aliases. i do not believe that this code saves us anything (the multipliers) and puts us at a disadvantage (reduces the useable rid space). the designers of NT aren't silly: if they can get away with a user- interface-speed LsaLookupNames / LsaLookupSids, then so can we. i spoke with isaac at the cifs conference, the only time for example that they do a security context check is on file create. certainly not on individual file reads / writes, which would drastically hit their performance and ours, too. - renamed myworkgroup to global_sam_name, amongst other things, when used in the rpc code. there is also a global_member_name, as we are always responsible for a SAM database, the scope of which is limited by the role of the machine (e.g if a member of a workgroup, your SAM is for _local_ logins only, and its name is the name of your server. you even still have a SID. see LsaQueryInfoPolicy, levels 3 and 5). - updated functionality of groupname.c to be able to cope with names like DOMAIN\group and SERVER\alias. used this code to be able to do aliases as well as groups. this code may actually be better off being used in username mapping, too. - created a connect to serverlist function in clientgen.c and used it in password.c - initialisation in server.c depends on the role of the server. well, it does now. - rpctorture. smbtorture. EXERCISE EXTREME CAUTION.
* Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison1998-11-1419-150/+150
| | | | | | | | | smbwrapper not made by default. nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include file problem...sigh. Jeremy.
* client/client.c: Patch to tidy up file size output.Jeremy Allison1998-11-021-4/+1
| | | | | | nmbd/nmbd.c: Someone (a "yank" no doubt :-) Changed instances of "initialise" to "initialize". Someone get that man an *English* dictionary.... :-) :-). Jeremy.
* removed comment line at end of fileLuke Leighton1998-11-021-2/+4
|
* took out Lukes change as it breaks domain logons for Win95 clientsAndrew Tridgell1998-10-311-4/+0
| | | | | | | | | | | | | | | | | | (ie. it breaks Sues machine). Luke, your comment was: put unicode strings after SAMLOGON query regardless of whether it's an NT mailslot or a non-NT mailslot, after having observed this behaviour out of NT machines. perhaps you could post the relevant tcpdump or netmon capture so we can see what is going on? I suspect that what you saw isn't exactly what the win95 boxes are generating. Maybe you saw a GETDCxxx instead of a GETDC000 ? Maybe we need a switch based on the GETDC request type? We won't know unless we see sniffs.
* Okay, this is really silly but removing one space from one debug statementChristopher R. Hertel1998-10-221-1/+1
| | | | | meant that one hex dump would fit within 80 characters in lynx after HTML conversion.
* Minor change.Christopher R. Hertel1998-10-221-1/+1
| | | | | | | | The debug_browse_data() function does a hex dump of a browser packet. The last line is often not a full 16 bytes, which would miss-align the hex output. I've added the padding needed to align the hex output. Chris -)-----
* Another cosmetic change.Christopher R. Hertel1998-10-221-2/+8
| | | | | | | | | | | | | | When dumping the wins.dat, this module will also write the database contents to the log file (don't do this if you have a large wins.dat!). The output was in a sort of tabular format, except that the asctime() function was used and it always terminates its output with a newline. I did a bit of fussing, removed the '\n' character, and did my best to line up the other columns. If the output format of asctime() is different on different systems, then the columns won't line up, but the output will still look better than it did before. Chris -)-----
* Changed the debug calls to use the newer debug macros. This allowed me toChristopher R. Hertel1998-10-211-59/+151
| | | | | break up some very long lines in both the code and the output. The change is mostly cosmetic, but should improve log file readability.
* fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).Luke Leighton1998-10-211-0/+6
| | | | | | put unicode strings after SAMLOGON query regardless of whether it's an NT mailslot or a non-NT mailslot, after having observed this behaviour out of NT machines.
* get type of callback rightAndrew Tridgell1998-10-051-1/+1
|
* Missed one removed multi-statement line. Grrr.Jeremy Allison1998-09-291-0/+1
| | | | Jeremy.
* Fixed bug introduced by me in dead code elimination.Jeremy Allison1998-09-291-22/+44
| | | | | | | Bug was caused by multiple C statements on a line. IMHO this is a *BUG* and will be treated as such.... Fixed all such multiple statements in this file. Jeremy.
* get away with dummy and .dummy filesAlexandre Oliva1998-09-291-1/+0
|
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-286-41/+9
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* automated generation of .dummy files for each subdirectory;Alexandre Oliva1998-09-281-1/+0
| | | | | dummy.in files are no longer needed, and new directories will be taken care of automatically, at configure (or config.status --recheck) time
* Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison1998-09-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy.
* added rpcclient programLuke Leighton1998-09-251-1/+7
|
* replace getpass() with getsmbpass() if getsmbpass.c compilesAlexandre Oliva1998-09-211-1/+1
|
* major autoconf clean-upAlexandre Oliva1998-09-211-0/+1
| | | | fix problems in builds with srcdir!=builddir