summaryrefslogtreecommitdiffstats
path: root/source/include/nameserv.h
Commit message (Collapse)AuthorAgeFilesLines
* IDL: build generated nbt code.Günther Deschner2008-04-171-0/+2
| | | | Guenther
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-15/+15
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r12107: Move to a tdb-based wins database. At the moment we stillJeremy Allison2007-10-101-3/+3
| | | | | | use it as though it were an in-memory db and dump out to a flat file every 2 mins, but that can now change. Jeremy.
* Use "unix netbios name" type unstring - 64 bytes long to manipulate netbiosJeremy Allison2004-03-151-4/+4
| | | | | | names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to expand to utf8 size on read. Jeremy.
* Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison2004-03-131-4/+4
| | | | | | | | | | (MORIYAMA Masayuki). Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name when represented in dos charset (ie. cp932). So go back to using fstrings for these but translate into nstrings (ie. 16 byte length values) for transport on the wire. Jeremy.
* Ensure we use correct length nstrings for workgroup and browser names.Jeremy Allison2003-08-271-4/+4
| | | | Jeremy.
* Half-way though the big conversion of all nmbd access to wire elements beingJeremy Allison2003-08-231-189/+178
| | | | | | | converted to pull/push_ascii. This will not work right at the moment for non English codepages, but compiles - I will finish the work over the weekend. Then nmbd should be completely codepage correct. Jeremy.
* sync 3.0 branch with headJelmer Vernooij2002-08-171-0/+2
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-0/+8
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* rewrote nmbd's wins backend to use a tdb instead of a flat text file.Jean-François Micouleau2002-01-251-0/+56
| | | | | | | | | | | | Changed the way the wins record are handled in memory. Now they are living much longer with the different states: active, released and tombstone. Also added a version ID, some wins flags and the wins owner ip address to the namrec->data struct, and a function to process messages sent by the wins replication daemon. the initiate_wins_processing() function is not correct, I'll fix it later. J.F.
* Process the SAM/UAS change notification message.Tim Potter2001-08-241-1/+1
|
* the final part of the nmbd merge between head and tng - this gets theAndrew Tridgell2000-03-271-0/+1
| | | | GETDC stuff sorted out
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-221-0/+9
| | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-7/+1
|
* jeremy is going to hate me for this.Luke Leighton1999-12-041-1/+1
| | | | | | | | | | | 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).
* - added DCE/RPC "fault" PDU support.Luke Leighton1999-11-151-0/+1
| | | | | | | | | - 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 bug with nmbd running wild due to recursion in ↵Jeremy Allison1998-12-171-0/+3
| | | | | | retransmit_or_expire_response_records(). Jeremy.
* added rpcclient programLuke Leighton1998-09-251-7/+0
|
* fixed a commentAndrew Tridgell1998-08-311-1/+1
|
* set a maximum name refresh time of 20 minutes.Andrew Tridgell1998-08-311-0/+4
| | | | | | | | | | The previous code was strictly correct, but not very practical. self names were only refreshed every 3 days. I hit a situation where the Samba WINS server was restarted after deleting wins.dat and didn't notice some remote subnets (also running Samba). I realised that the complete database wouldn't have been rebuilt for 3 days, which is way too long. In order to recover from WINS restarts we need a much shorter maximum refresh time.
* changed the size of a char array in the userdata_struct from 1 to 16Andrew Tridgell1998-08-301-1/+1
| | | | | | | | | | | | to account for padding/alignment issues. Eventually I'd like to find a way to get rid of this construct altogether as it is a bit error prone and hard to debug. also added a new macro: ZERO_STRUCTP() that takes a pointer to a structure and zeros the structure. Used in nmbd to zero allocated structures before freeing them to try to catch bugs a bit faster.
* Converted the browser database to a ubi_dLinkList. This should reduce codeChristopher R. Hertel1998-07-241-11/+8
| | | | | size, etc. Also did a bit of work to add comments. Chris -)-----
* I've replaced the linked list used to manage the subnet namelists with aChristopher R. Hertel1998-06-101-9/+9
| | | | | | | | | | | | | | splay tree. For short lists, this will have no noticable effect. As lists (eg. the WINS database) grow longer, the speed improvements should be quite dramatic. This change is an incremental step toward replacing the in-memory namelists with a back-end database. This change is going into the 1.9.19pre-alpha code because...well...it's pre-alpha. Please let me know if there are any problems. (Oh, as a side-effect, the wins.dat will be in sorted order. :) Chris -)-----
* This is a first step toward moving long namelists into a database. IChristopher R. Hertel1998-06-091-19/+22
| | | | | | | | | | | split the name_record structure into pieces. The goal is that the key (the name) be separate from the data associated with the key. Databases such as gdbm store information in [key,content] pairs. There is no functional change in with this update. It's just a step in the direction that Jeremy and I have been discussing. Chris -)-----
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-1/+1
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison1997-12-161-0/+1
| | | | | | Also added code to stop old Samba servers that announce the workgroup name as master browser name when they are a local master browser. Jeremy.
* This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-176/+306
| | | | | | | | back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy.
* Big change to make nmbd code more readable/understandable.Jeremy Allison1997-10-231-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is removal of find_name_search() confusion. This has been replaced with find_name_on_subnet() which makes it explicit what is being searched. Also changed wins_subnet to be wins_client_subnet in preparation for splitting the wins subnet into client and server pieces. This is a big nmbd change and I'd appreciate any bug reports. Specific changes follow : asyncdns.c: Removed wins entry from add_netbios_entry(). This is now explicit in the subnet_record parameter. interface.c: iface_bcast(), iface_nmask(), iface_ip() return the default interface if none can be found. Made this behavior explicit - some code in nmbd incorrectly depended upon this (reply_name_status() for instance). nameannounce.c: find_name_search changes to find_name_on_subnet. namebrowse.c: wins_subnet renamed to wins_client_subnet. namedbname.c: find_name_search removed. find_name_on_subnet added. add_netbios_entry - wins parameter removed. namedbsubnet.c: find_req_subnet removed - not explicit enough. nameelect.c: wins_subnet renamed to wins_client_subnet. namepacket.c: listening() simplified. nameresp.c: wins_subnet renamed to wins_client_subnet. nameserv.c: find_name_search moved to find_name_on_subnet. nameserv.h: FIND_XXX -> changed to FIND_SELF_NAME, FIND_ANY_NAME. nameservreply.c: find_name_search moved to find_name_on_subnet. Debug entries changed. nameservresp.c: wins_subnet renamed to wins_client_subnet. namework.c: wins_subnet renamed to wins_client_subnet. nmbd.c: wins parameter removed from add_netbios_entry. nmbsync: wins_subnet renamed to wins_client_subnet. proto.h: The usual. server.c: remove accepted fd from fd_set. Jeremy (jallison@whistle.com)
* Implemented asynchronous DNS lookups in nmbd.Andrew Tridgell1997-10-221-11/+12
| | | | | | | | | | | | | | | | | | | | | I realised this afternoon just how easy it is to add this, so I thought I'd implement it while the idea was fresh. nmbd forks at startup and uses a pipe to talk to its child. The child does the DNS lookups and the file descriptor of the child is added to the main select loop. While I was doing this I discovered a bug in nmbd that explains why the dns proxy option has been so expensive. The DNS cache entries in the WINS list were never being checked, which means we always did a DNS lookup even if we have done it before and it is in cache. I'm sure this used to work (I tested the DNS cache when I added it) so someone broke it :-( Anyway, the async DNS gets rid of the problem completely. I'll commit just the fix to the DNS cache bug to the 1.9.17 tree. You can disable async DNS by adding -DSYNC_DNS to the compile flags.
* .cvsignore: Added make_smbcodepageJeremy Allison1997-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | interface.c: Added is_local_net(). locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu> plus a race condition fix for the fix. nameannounce.c: Made function static. namedbresp.c: extern int ClientDGRAM removed - not used. namedbserver.c: extern int ClientDGRAM removed - not used. namedbsubnet.c: Added code to make sockets per subnet. namepacket.c: Added code to read from all sockets & filter. nameresp.c: extern int ClientDGRAM removed - not used. nameserv.c: Indentation tidyup :-). nameserv.h: Added sockets to struct subnet. nameservresp.c: Improved debug message. nmbd.c: Changed to terminte on listen_for_packets exiting. nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used. proto.h: The usual. util.c: Fixed debug message. Jeremy (jallison@whistle.com)
* fixed the freeze on logout bug. The fix has several parts:Andrew Tridgell1997-10-151-0/+1
| | | | | | | | | | | | | | | | | | 1) add a new parameter to queue_netbios_packet(), the "reply_id", this is the id that should be used when sending a further response to the packet (such as a response after we get back a reply to a name query after senidnga WACK). reply_id is 0 (meaning unused) in most cases. 2) fix the id used in the reply in add_name_respond() from response_name_query_register() 3) remember to remove the response record at the end of response_name_query_register() 4) get the right IP address (it was 0.0.0.0) in response_name_query_register() 5) add a new field reply_id to struct response_record
* namelogon.c :Luke Leighton1997-10-111-0/+7
| | | | | | | | | | | | | | | | added NTLOGON. (fixed the case 0:) namepacket.c: call to NTLOGON mailslot nameserv.h defines for NETLOGON and NTLOGON mailslot util.c: added andrew's dump_data() function.
* client.c: Minor change to cast parameters for DEC unix.Samba Release Account1997-07-301-5/+4
| | | | | | | | | | | | | clientutil.c: Minor change to cast parameters for DEC unix. ipc.c: Fixes to parameterise the stuff John wants. loadparm.c: Fixes to parameterise the stuff John wants. nameannounce.c: Fixes to parameterise the stuff John wants. namedbwork.c: Fixes to parameterise the stuff John wants. nameserv.h: Fixes to parameterise the stuff John wants. proto.h: Fixes to parameterise the stuff John wants. smb.h: Fixes to parameterise the stuff John wants. util.c: tidy. Jeremy (jallison@whistle.com)
* client.c: Added amanda fixes.Samba Release Account1997-07-281-1/+0
| | | | | | | | | | | clitar.c: Added amanda fixes. nameannounce.c: Removed redundent code. nameelect.c: Removed redundent code. nameserv.h: Removed redundent code. nameservresp.c: Removed redundent code. namework.c: Removed redundent code. password.c: Prevented crash if getpwnam fails. Jeremy (jallison@whistle.com)
* charset.c: Dropped debug message to level 6.Samba Release Account1997-06-161-1/+2
| | | | | | | | loadparm.c: Added "time server" parameter. nameserv.h: Added "time server" parameter. proto.h: Added lp_time_server(). server.c: Removed incorrect | 0700 - this was a whistle specific change. Jeremy (jallison@whistle.com).
* use NULL instead of 0Samba Release Account1997-05-121-2/+2
| | | | lkcl
* 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1997-05-081-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1.
* jra@cygnus.com: Changed CHECK_TIME_MST_ANNOUNCE back to 15 from 1 (from test).Samba Release Account1997-04-091-2/+1
|
* Large changes from jra@cygnus.com. Mainly browser updates.Samba Release Account1997-04-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | access.c: Fixed crash if yp domain unavailable. includes.h: Moved ifdefs for minor platform. interface.c: Changed name of ipgrp to wins_ip to make it clearer. loadparm.c: Changed default of wins support to 'no'. nameannounce.c: Many changes to fix cross subnet browsing. namebrowse.c: Many changes to fix cross subnet browsing. namedbname.c: Many changes to fix cross subnet browsing. namedbresp.c: Many changes to fix cross subnet browsing. namedbsubnet.c: Many changes to fix cross subnet browsing. namedbwork.c: Many changes to fix cross subnet browsing. nameelect.c: Many changes to fix cross subnet browsing. namelogon.c: Many changes to fix cross subnet browsing. namepacket.c: Many changes to fix cross subnet browsing. nameresp.c: Many changes to fix cross subnet browsing. nameserv.c: Many changes to fix cross subnet browsing. nameserv.h: Many changes to fix cross subnet browsing. nameservreply.c: Many changes to fix cross subnet browsing. nameservresp.c: Many changes to fix cross subnet browsing. namework.c: Many changes to fix cross subnet browsing. nmbd.c: Change to search wins subnet. nmbsync.c: Change to check if we are any master before proceeding. proto.h: Added find_subnet_all() and check_work_servertype(). util.c: Moved 'done' settings on name resolution.
* added code that checks whether the DOMAIN<1b> name is claimed on theSamba Release Account1997-03-121-1/+2
| | | | | | | | | | | | | local subnet _before_ going and registering it. the reason for this is that i don't want to cause chaos by registering the name twice. it's ok to register DOMAIN<1b> with the WINS server, because the WINS server's job is to check a) _if_ there's a current owner of the name b) if the current owner exists c) if the current owner still wants the name. if they don't, the WINS server responds by saying, 'yes, you can have it'. lkcl
* 1) updated ipc.c NetUserGetInfo - load \\%L\%U instead of \\%L\HOMESSamba Release Account1997-03-091-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | because the share must be browseable by a w95 client 2) send_mailslot_reply - unique or group datagram argument added. 3) netlogon.c - rewrote response packet to do the right thing for w95. 4) server.c reply_nt1() - added OEMDomainstring to the end. 5) (deep breath) reworked the nmbd-browsing code a little bit. i discovered two months ago that becoming a primary domain controller (and domain master browser) is done independently of becoming a backup domain controller (logon server) is done independently of becoming a local master browser. therefore, three sets of state-machines (instead of just one) are in place - each of which is responsible for taking samba through the required stages to become: a logon server; a domain master browser; and a local master browser. each of these three things can occur independently on each interface, _including_ the wins pseudo-interface. the only slight caveat is that the wins pseudo-interface, by virtue of _not_ being a broadcast interface, does _not_ register as a local master browser with the wins server, as this doesn't make sense. lkcl
* JHT ===> Updated SV_TYPE defines in smb.h (added WIN95 entry)Samba Release Account1997-02-221-1/+1
| | | | nameserv.h returned to original state.
* backout all the changes to nmbd.Andrew Tridgell1996-10-021-51/+29
| | | | | The 1.9.16 tree is now back to 1.9.16p2 as far as nmbd is concerned apart from a small change that fixes the announce type in two places.
* - a huge pile of changes from Luke which implement the browse.confAndrew Tridgell1996-10-021-29/+51
| | | | | | | stuff and also fix a pile of nmbd bugs. Unfortunately I found it very hard to disentangle the new features from the bug fixes so I am putting in the new code. I hope this is the last big pile of changes to the 1.9.16 series!
* removed all of lukes recent changes. I need to do a p2 release butSamba Release Account1996-08-241-33/+25
| | | | | | | can't test the multi group changes. I also found that some of lukes changes wiped out some recent bug fixes. Is your CVS tree ok luke?
* - fixed bugs in nmb response packet checking.Samba Release Account1996-08-231-25/+33
| | | | | | | - added multiple workgroup code - samba can register under different (unique) NetBIOS aliases, one per workgroup it joins. lkcl
* - new handling of ST_TYPE bits, they are now consolidated much more inAndrew Tridgell1996-08-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DFLT_SERVER_TYPE in nameserv.h - got rid of a lot of spurious domain controller stuff. Samba is not a domain controller yet, but it can be a domain master. We were claiming to be a domain controller in some packets which may have caused problems - don't do preferred master startups on the WINS pseudo-net - don't do election requests on the WINS pseudo-net - fix a nasty bug in become_non_master() which wiped out the bits in remove_type before using them. The result was that samba didn't like losing its master status. - changed the logic in the election packet handling to enable us to become a non-master whenever we receive a winning election frame, even if we aren't expecting it - get another packet from the socket in nmbd when we reject one of our own packets, this stops us from going into the packet reading code too often and makes nmbd much snappier - always remove a name immediately when we try to release it, don't wait for the lack of response from the network, otherwise we will end up replying to name that we don't really own. We still send the dereg packets, we just don't wait for them to time out.