summaryrefslogtreecommitdiffstats
path: root/source/libsmb/nmblib.c
Commit message (Collapse)AuthorAgeFilesLines
* Pass specific packets to build_nmb and build_dgramVolker Lendecke2008-03-081-6/+4
| | | | | | To me it was not clear what parts of struct packet_struct are actually used in build_packet(). This makes it a bit more clear that only the specific parts are used.
* packet_struct is used in several places as raw memoryVolker Lendecke2007-12-191-0/+2
| | | | -> Fix more uninitialized variable warnings
* remove some staticsVolker Lendecke2007-12-051-42/+7
|
* This is a large patch (sorry). Migrate from struct in_addrJeremy Allison2007-10-241-7/+8
| | | | | | | | | | | | | to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-12/+12
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r25510: Now we're returning the port instead of using a global,Jeremy Allison2007-10-101-1/+1
| | | | | remember to use ntohs. Hopefully will fix the build farm. Jeremy.
* r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal withJeremy Allison2007-10-101-190/+283
| | | | | | the ripple effects this causes. utmp has to change etc. Remove some global varables and store address/port in the unexpected db. 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.
* r15240: Correctly disallow unauthorized access when logging on with theGünther Deschner2007-10-101-1/+1
| | | | | | | | | | | | kerberized pam_winbind and workstation restrictions are in effect. The krb5 AS-REQ needs to add the host netbios-name in the address-list. We don't get the clear NT_STATUS_INVALID_WORKSTATION code back yet from the edata of the KRB_ERROR but the login at least fails when the local machine is not in the workstation list on the DC. Guenther
* r12107: Move to a tdb-based wins database. At the moment we stillJeremy Allison2007-10-101-1/+1
| | | | | | 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.
* r6225: get rid of warnings from my compiler about nested externsHerb Lewis2007-10-101-2/+3
|
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-10/+7
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2224: Make nmbd more robust against bad netbios packets.Jeremy Allison2007-10-101-0/+5
| | | | Jeremy.
* r776: I should have just cut and pasted from my build area and I wouldHerb Lewis2007-10-101-1/+1
| | | | have gotten this right :-)
* r775: merge trunk 774 to samba 3_0 - fix bad compare in for loopHerb Lewis2007-10-101-5/+1
|
* Ensure we don't truncate strcmps to nstring anymore...Jeremy Allison2004-03-131-1/+4
| | | | Jeremy.
* Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison2004-03-131-11/+17
| | | | | | | | | | (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.
* First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) toJeremy Allison2004-03-131-805/+854
| | | | | | fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c so it's readable. Jeremy.
* if we are truncating to the . we need to start at the beginning in caseHerb Lewis2004-03-121-1/+1
| | | | | | | there are multiple "."'s in the name. This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this is #define'd to 1 directly above. Should we also get rid of the #ifdef?
* Fix the character set handling properly in nmbd. Also fix bug whereJeremy Allison2003-08-271-2/+1
| | | | | | | iconv wasn't re-initialised on reading of "charset" parameters. This caused workgroup name to be set incorrectly if it contained an extended character. Jeremy.
* Use correct size (17 not 16) when doing a push_ascii(). Ensure thatJeremy Allison2003-08-221-1/+1
| | | | | wins hook is called with unix charset. Jeremy.
* Ensure nmb_namestr() converts back from CH_DOS to CH_UNIX.Jeremy Allison2003-08-221-13/+16
| | | | Jeremy.
* Try again to fix up 'session request' name exchange. This time we actualyAndrew Bartlett2003-07-271-3/+3
| | | | | | get the names... Andrew Bartlett
* Some small fixes to our charset conversion code:Andrew Bartlett2003-07-271-4/+8
| | | | | | | | | | | | | | | - Treat the NMB names in the 'session request' packet as 'ASCII'. This means that we do not get invalid multibyte from the wire, even if we truncate in the conversion. (Otherwise we panic when we try to strupper_m it). - Remove acnv_uxu2(), as it was duplicated by push_ucs2_allocate() - Remove acnv_dosu2(), as it is not used. - In push_ucs2(), with the STR_UPPER flag, do the case conversion *after* the UCS2 conversion, when it we know that the length can't change. Also faster, as we don't need to do another 2 UCS2 conversions. Andrew Bartlett
* Removed strupper/strlower macros that automatically map to ↵Jeremy Allison2003-07-031-1/+1
| | | | | | | strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy.
* fixed a pstrcpy() that is not on a pstringAndrew Tridgell2003-06-061-1/+1
|
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-4/+4
| | | | | | warnings. (Adds a lot of const). Andrew Bartlett
* Ensure global_scope() returns "", not the NULL string. Froma tpot fix.Jeremy Allison2002-12-061-1/+1
| | | | Jeremy.
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-16/+15
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-2/+2
|
* Copying commit from HEAD.Christopher R. Hertel2002-04-221-2/+13
| | | | | | | | | | | | | | | | My seven-year-old daughter calls me 'Captain Pedantic'. I don't know which is freakier... the name or the fact that a seven-year-old knows what it means. Small change to correct the value we place in the DGM_LENGTH field of NBT Datagram messages. We have been counting the full datagram, but it's fairly clear in the RFCs that we should only count the source name, destination name, and payload. We've been overcharging by 14 bytes (the size of the NBT DGM header). This fix brings us in line with what Windows does, and what the RFCs say should be done. I'm a little surprised that this didn't cause any bugs or error messages. I guess no one actually checks this field.
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-1/+1
| | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* prevent a bogus insure wild ptr messageAndrew Tridgell2001-11-271-1/+2
|
* This patch applied, except without the structure changes to nmblib.cAndrew Bartlett2001-10-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andrew Bartlett. From kai@cmail.ru Mon Oct 29 18:50:42 2001 Date: Fri, 19 Oct 2001 17:26:06 +0300 From: Andrew V. Samoilov <kai@cmail.ru> To: samba-technical@lists.samba.org Subject: [patch]: makes some arrays const to be shared between processes Hi! This patch makes some arrays const. So these arrays go to text/rodata segment and are shared between all of the processes which use shared library with these arrays. Regards, Andrew V. Samoilov. P.S. Please cc your answer to kai@cmail.ru, I don't subscribed to this list. ChangeLog: * cliconnect.c (prots): Make const. * clierror.c (rap_errmap): Likewise. * nmblib.c (nmb_header_opcode_names): Likewise. (lookup_opcode_name): Make opcode_namep const. Eliminate i. * nterr.c (nt_err_code_struct): Typedef const. * smberr.c (err_code_struct): Make const. (err_classes): Likewise.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-4/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-30/+10
|
* allow for the NULL in make_nmb_name()Andrew Tridgell2001-08-201-1/+1
|
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-3/+1
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Merge of Andrew's changes in 2.2.Jeremy Allison2001-04-131-1/+1
| | | | Jeremy.
* Convert netbios name to dos codepage in make_nmb_name(). This allowsTim Potter2001-02-021-0/+1
| | | | nmblookup and smbclient to work with i18n netbios names.
* Fix from RFritz@lbl.gov for Linux ECONREFUSED async errors on Linux.Jeremy Allison2000-10-061-2/+10
| | | | Jeremy.
* 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.
* 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.
* moved nmblib-specific code from util.c to nmblib.c.Luke Leighton2000-03-271-9/+203
|
* Multiple-dot scope handling fix from Greg Bowering gb@pobox.comJeremy Allison2000-02-231-2/+2
| | | | Jeremy.
* fixed a commentAndrew Tridgell2000-01-071-1/+1
|