summaryrefslogtreecommitdiff
path: root/source3/nmbd
AgeCommit message (Collapse)AuthorFilesLines
1999-12-01more cli_session_setup() calls. what the heck are these doing???Luke Leighton1-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. (This used to be commit fcc39b3f4f2f8d04d3fab09db048b4f3dc1e97d5)
1999-12-01sys_select added one more argument (read, write selectors).Luke Leighton1-1/+1
(This used to be commit e4d92ff9dfc51735e6932748f66a7c20b2c1cb6a)
1999-11-19- bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursionLuke Leighton2-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. (This used to be commit 8e406c1fa296c3f97b1cd7ddde7b5aeb9232b26e)
1999-11-18responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, theLuke Leighton2-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. (This used to be commit 4aea261cb0e5f34255ff83271eb5cadb0eb78bc9)
1999-11-18added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1-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. (This used to be commit 98ddeaf442cb30972cb281bf0489a6e5f7eb2883)
1999-11-15- added DCE/RPC "fault" PDU support.Luke Leighton1-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. (This used to be commit 25c70e3c984c4fed19763ed405741e83fe14f87e)
1999-08-08Fix for Win95 not being able to find PDC (for User/Server Manager, andMatthew Chapman1-11/+14
password change requests), from Michael Stockman <pgmtekn@algonet.se>. GETDC on \MAILSLOT\NET\NETLOGON necessarily returns less information than the NTLOGON version. (This used to be commit 8a603a8793cb067cd06edc3d73d0b35c427ed5ed)
1999-04-11Trying to improve DC location & browsing performance for the average userMatthew Chapman2-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). (This used to be commit 4a23a358b5ad8873acb7db11f27b87d2a016bec1)
1999-03-17SAMLOGON query - alignment issue is beginning to get to me.Luke Leighton1-0/+2
(This used to be commit baf55934dc5118f8c423fe05c0e4b8d7c018fa14)
1999-03-17alignment issue for UDP SAMLOGON response.Luke Leighton1-2/+2
(This used to be commit 9d01e9d86a8d22a283a8377a12bb175398547d78)
1999-03-09alignment issue in UDP SAMLOGON response.Luke Leighton1-3/+6
(This used to be commit de290627f06915d420d37d2a3ac2f736c4cf8d74)
1999-03-09mods to allow inter-domain trust accounts to be added to SAM databaseLuke Leighton1-51/+4
using smbpasswd command. (This used to be commit 62d499f83256c6e8b3308dc4bd8e9f5df873b14b)
1999-03-09oh dear, it's this one again. removed check for MAILSLOT\NTLOGON becauseLuke Leighton1-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. (This used to be commit 74c7d626cd85189c902489d220c3eca30a4b1bb1)
1999-02-15Always null-terminate strings.Matthew Chapman1-7/+7
Also some string length and sizeof(pointer) corrections. (This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
1999-02-12UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1-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). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
1998-12-17Fix bug with nmbd running wild due to recursion in ↵Jeremy Allison2-9/+27
retransmit_or_expire_response_records(). Jeremy. (This used to be commit d5f05b4faef50e7cfc0ed05a87d92e14102106c6)
1998-12-09oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.Luke Leighton1-1/+1
(This used to be commit ca10eb44909e66a07dc7f88b0a740390f9ec3922)
1998-12-09need to initialise global_myworkgroupLuke Leighton1-0/+5
(This used to be commit 501617307f3b9bbad76406d00b1bc82f5cb479a6)
1998-12-09removed the SID stuff from the head branch as well.Andrew Tridgell2-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 :) (This used to be commit be697c9ef00f1b6366228dcdd3983d68158dd94f)
1998-12-03jean-f spotted race condition on generation of sam sid, from startingLuke Leighton1-1/+1
nmbd and smbd. nmbd is now client: smbd is solely responsible for creating sam_name.SID (This used to be commit 50fa4822df679b4d54b5a868179594ec087e811f)
1998-12-01rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton1-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. (This used to be commit 3e1eb4f26b67e484b05e1dde94fd4e4dae982631)
1998-11-29weekend work. user / group database API.Luke Leighton1-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... (This used to be commit 5d5d7e4de7d1514ab87b07ede629de8aa00519a1)
1998-11-17Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison4-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. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
1998-11-17- group database API. oops and oh dear, the threat has been carried out:Luke Leighton1-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. (This used to be commit 0d21e1e6090b933f396c764af535ca3388a562db)
1998-11-14Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison19-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. (This used to be commit 9ee8f39aed8772a05c203161b4ae6b7d90d67481)
1998-11-02client/client.c: Patch to tidy up file size output.Jeremy Allison1-4/+1
nmbd/nmbd.c: Someone (a "yank" no doubt :-) Changed instances of "initialise" to "initialize". Someone get that man an *English* dictionary.... :-) :-). Jeremy. (This used to be commit 6279be7f96802bb132e5e18dd8c6912652296e70)
1998-11-02removed comment line at end of fileLuke Leighton1-2/+4
(This used to be commit 5e2fc8b7ccf4a9c8b0a2acf4bd752531ac6fa775)
1998-10-31took out Lukes change as it breaks domain logons for Win95 clientsAndrew Tridgell1-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. (This used to be commit a2bacc08955ba61aac4b45b63a54b279e5776261)
1998-10-22Okay, this is really silly but removing one space from one debug statementChristopher R. Hertel1-1/+1
meant that one hex dump would fit within 80 characters in lynx after HTML conversion. (This used to be commit c391f076f29cff917fd51d58598e1ad11048e824)
1998-10-22Minor change.Christopher R. Hertel1-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 -)----- (This used to be commit 9f9b30abab118f0a2e007beddd79de38a2d5ea29)
1998-10-22Another cosmetic change.Christopher R. Hertel1-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 -)----- (This used to be commit 57295113feefcde77b429c661878444cd078b21f)
1998-10-21Changed the debug calls to use the newer debug macros. This allowed me toChristopher R. Hertel1-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. (This used to be commit fc4e0148ebf8ea45e4410224218c0c987965d36c)
1998-10-21fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).Luke Leighton1-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. (This used to be commit c101113ec20ed0ba633e78e4ee45596cdccaf1b5)
1998-10-05get type of callback rightAndrew Tridgell1-1/+1
(This used to be commit 327eba774e5bb17a91f80617bd7359afe0c83f48)
1998-09-29Missed one removed multi-statement line. Grrr.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 7958787d9beffcd0f025c7a85469844d2e520ce5)
1998-09-29Fixed bug introduced by me in dead code elimination.Jeremy Allison1-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. (This used to be commit ea3ab46f12565ac6ccbb8c69825acedd3640ec12)
1998-09-29get away with dummy and .dummy filesAlexandre Oliva1-1/+0
(This used to be commit 90a8a02484a0897b053fd6531b7fec5d23098b6f)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison6-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. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-09-28automated generation of .dummy files for each subdirectory;Alexandre Oliva1-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 (This used to be commit 237a8e5fe62d757c04b8207cbbee4df1470cfe4e)
1998-09-25Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison2-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. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
1998-09-25added rpcclient programLuke Leighton1-1/+7
(This used to be commit aa38f39d67fade4dfd7badb7a9b39c833a1dd1ca)
1998-09-21replace getpass() with getsmbpass() if getsmbpass.c compilesAlexandre Oliva1-1/+1
(This used to be commit 9a5bdf5c1bef689fe0d6879949df869efbc34783)
1998-09-21major autoconf clean-upAlexandre Oliva1-0/+1
fix problems in builds with srcdir!=builddir (This used to be commit 1ffc3b807a3f80644c974b454ff5e6f68e89b546)
1998-09-18oops ... I got the filenames wrong in my cleanup of the wins databaseAndrew Tridgell1-1/+2
save, so it started saving weird filenames (from an unitialised fstring). chaos reigns! (This used to be commit 20a550d61e322cc9a0acfdf8fb974dafe0cd9603)
1998-09-18nmbd/nmbd_winsserver.c: Fixed printf style warning.Jeremy Allison1-1/+1
script/mkproto.awk: Added SMB_BIG_UINT. Jeremy. (This used to be commit c22c40f0caa7d6a9e8120e6415fa728db708db3e)
1998-09-17configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1-1/+1
config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy. (This used to be commit c381d32e3dc23fe887408016cae821aceb30da2c)
1998-09-17fixed another potential fork bomb where the wins file becomesAndrew Tridgell2-0/+5
non-writeable for some reason. (This used to be commit 9edd43dcd6cc040416f11e00320c53682558fd8a)
1998-09-17fixed the nmbd fork bomb. It was a silly mistake, asAndrew Tridgell1-0/+3
expected. wins_write_database() didn't exit after doing its stuff, so when it returned you had two copies of nmbd :) (This used to be commit 5e6488d4830016ea720a644c1b1ae25b336d3b8b)
1998-09-17fixed a typo in my last commitAndrew Tridgell1-1/+1
(This used to be commit 31b4048362c63ab19e9ef35453c3763eec8b8f2b)
1998-09-17fixed a potential problem with wins_write_database() child processes.Andrew Tridgell3-13/+13
In sig_term() we were calling wins_write_database(0) which would fork a child. This child might then get killed by the same process killing off the parent. That process would then fork another child etc. The solution is to pass a "background" flag to wins_write_database(0) and only fork if this is set. (This used to be commit 1e1a512e3ff59f962fb3de382f671618bed60839)