summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-4/+5
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6106: Fix bug #2551. It turns out that the incoming flags2 flag ↵Jeremy Allison1-3/+3
FLAGS2_LONG_PATH_COMPONENTS determines if a reply is uppercased on a SMBsearch request, not the protocol level. This could clear up quite a few hacks going forward I think. Jeremy. (This used to be commit 8c64cd368fdd2c5a4b361904855c135ade3f449e)
2007-10-10r6080: Port some of the non-critical changes from HEAD to 3_0. The main one ↵Volker Lendecke1-3/+7
is the change in pdb_enum_alias_memberships to match samr.idl a bit closer. Volker (This used to be commit 3a6786516957d9f67af6d53a3167c88aa272972f)
2007-10-10r6049: Ensure "dos filetime" checks file ACLs correctly. May fix Excel ↵Jeremy Allison1-18/+0
"read-only" issue. Jeremy. (This used to be commit 80e788143a6c3d973d3b8e57d91ca5c4a83605b2)
2007-10-10r6044: Ensure the old search calls always ask mask_match to translateJeremy Allison1-1/+17
patterns like ????????.??? - even if using an NT1 protocol. Matches W2K3 behavior. Jeremy. (This used to be commit 67f6473f50f3284b9ccbe6f983f23cd42b3b7c9f)
2007-10-10r6022: Fix for bug #2533. Incorrect dir listings from OS/2 clients.Jeremy Allison1-1/+3
Jeremy. (This used to be commit cf8949f684ee9adcd35d56d923b2f5733efc05ac)
2007-10-10r6014: rather large change set....Gerald Carter1-0/+4
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
2007-10-10r5100: We should only care about case-sensitivity when *reading* an incomingJeremy Allison1-2/+2
filename, not returning one. Makes us pass one more Samba4 RAW-SEARCH test. Jeremy. (This used to be commit 228d1e1649a0b4952eb5603cb5e1851cdc8f0c72)
2007-10-10r5066: A couple of small fixes from James Peach @ SGI.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 9d131e94195df79e07c8fad20e12ba1b67441a81)
2007-10-10r4581: From Derrell.Lipman@UnwiredUniverse.com. Use nanosleep instead of selectJeremy Allison1-1/+14
when we have it in smb_msleep. Jeremy. (This used to be commit 465c207ffbcd5ee859faee282ef220a6c72e4eeb)
2007-10-10r4120: Never, ever, doubt valgrind :-). Fix order of evaluation bug that's ↵Jeremy Allison1-9/+3
been in the bitmap code for ever. Remove silly extra space in paranoid malloc. Jeremy. (This used to be commit 0a7d17bc9b178628da371e627014412e9bef5d42)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-27/+132
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use ↵Jeremy Allison1-1/+1
consistent enum type for Protocol extern. Jeremy. (This used to be commit 65dfae7ea45d4c9452b2a08efa09b01d870142f3)
2007-10-10r3650: Allow to call spoolss-server as "localhost".Günther Deschner1-1/+6
Guenther (This used to be commit 14a0292250ee9975618b68701a48c72195286d85)
2007-10-10r2868: Well, I'm not quite sure what I'm doing back in Samba 3.0, but anyway...Andrew Bartlett1-0/+22
I've been grumbling about under-efficient calls in SAMR, and finally got around to fixing some of them. We now call sys_getgroups() (which in turn calls initgroups(), until glibc 3.4 is released) to figure out a user's group membership. This is far, far more efficient than scanning all the groups looking for a match, and is still the 'posix way', just using an effiecient call. The seperate issue of 'who is in this group' remains, but this one has been biting some people. I need to talk to VL about how best to exersise nasty corner cases, but my initial tests hold strong. (The code is also much simpiler than before, which has to count for something :-) Andrew Bartlett (This used to be commit dc19f161698dab5b71d61fa2bacc7e7b8da5fbba)
2007-10-10r2824: restored the is_case_sensitive option to ms_fnmatch() in Samba3. It isAndrew Tridgell1-1/+1
very rarely used, but we sohuldn't be removing a feature in a minor release of this kind. (This used to be commit 4ce0505bc369243aa77013519ce4e4f6e50f5a48)
2007-10-10r2813: Fix the build.Rafal Szczesniak1-1/+1
At least temporarily, since I've got the impression that _real_ fix is more complex... rafal (This used to be commit 982912f0c8547b0f0edc8d0b26e36e9701cdee82)
2007-10-10r2768: BUG 1519: save the hostname used in the open_printer_ex() for later ↵Gerald Carter1-7/+45
reuse when filling in the spolss replies (also gets rid of get_called_name() (This used to be commit 57db8ca91f52329c7f8985c04463b6b69015b0c4)
2007-10-10r2133: Several fixes:Gerald Carter1-6/+2
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1 patch from Olaf Flebbe <o.flebbe@science-computing.de>. Will need to watch this one in the build farm. * Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED was getting reset by attempts to sanitize the defined attributes (PRINTER_ATTRIBUTE_SAMBA) * Resolve name conflict on DEC OSF-5.1 (inspired by patch from Adharsh Praveen <rprav@india.hp.com>) * Work around parsing error in the print change notify code (not that the alignment bug is still there but reording the entries in the array works around it). * remove duplicate declaration of getprintprocdir from rpcclient. (This used to be commit 7474c6a446037f3ca2546cb6984d800bfc524029)
2007-10-10r1890: Cut down on debug messages from is_in_path. paulgPaul Green1-3/+2
(This used to be commit 8b1c2126af3f29a3708b6823616ecec43ce63b95)
2007-10-10r1215: Intermediate checkin of the new keytab code. I need to make sure IJeremy Allison1-0/+15
haven't broken krb5 ticket verification in the mainline code path, also need to check with valgrind. Everything now compiles (MIT, need to also check Heimdal) and the "net keytab" utility code will follow. Jeremy. (This used to be commit f0f2e28958cb9abfed216c71f291f19ea346d630)
2007-10-10r1156: Ensure new remote arch of CIFSFS is seen.Jeremy Allison1-0/+3
Jeremy. (This used to be commit 33fa4b8b27427874ac70af00908d97709c1cddc7)
2007-10-10r647: fix for setting the called name to by our IP if the called name was ↵Gerald Carter1-18/+0
*SMBSERVER and *SMBSERV -- fixes issue with connecting to printers via \ip.ad.dr.ess\printer UNC path (This used to be commit 8ee268f0ed0c2f75ded9c2ddd66e0953f443c79e)
2007-10-10r645: Patch from kawasa_r@itg.hitachi.co.jp to correctly enable core dumps.Jeremy Allison1-0/+3
Jeremy. (This used to be commit ea41d694270264557f740cd40ccc69b4acaa57e9)
2007-10-10r570: Remove lots of globals to handle case issues - move themJeremy Allison1-15/+2
to connection struct entries (as they should have been from the start). Jerry, once you've cut over to 3.0.4 release branch I'll add this to 3.0 also. - Jerry cut over :-). Jeremy. (This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
2004-03-21Given how often a panic has to do with malloc() problems, don't temptAndrew Bartlett1-1/+1
things more by calling SAFE_FREE() just before we exit our panic handler. Andrew Bartlett (This used to be commit d0b820562b8a7f8e5d0224926d46590b9f1ca9a3)
2004-03-18Merge from HEAD for Amanda group.Jeremy Allison1-0/+14
Apply Craig Barratt's fixes to allow multiple exlusion files and patterns. Jeremy. (This used to be commit 0272fac8ca40b3d4ea4de8ac8a2e371d450d12e6)
2004-03-09Added strstr_m() function. Use in all places where we might run into mbJeremy Allison1-2/+2
(should fix the mb service name problem, can't remember the bugid). Jeremy. (This used to be commit 94a272b9a881ec0004c5da2a7242b0a818da5630)
2004-02-23Janitor for tpot...bugzilla #1098, msleep already exists on aixJim McDonough1-1/+1
(This used to be commit 4319df7fdc2d878c509381923cc1db4d731620ba)
2004-02-12merge from old APP_HEADGerald Carter1-1/+13
* remove corrupt tdb and shutdown (only for printing tdbs, connections, sessionid & locking) * decrement smbd counter in connections.tdb in smb_panic() * various Makefile hack to get things to link 'max smbd processes' looks like it might be broken. The counter KEY is not being set. Will look into that tomorrow. (This used to be commit 6e22c5da929b6d9a4e32dc704c83112b2ad8fcfd)
2004-02-11Added James Peach's fix for #1038.Jeremy Allison1-0/+40
Jeremy. (This used to be commit 5379ad98241950c581d88acbee1e256187b13582)
2004-01-30Fix up name canonicalization (needed for krb5 keytab support later).Jeremy Allison1-46/+28
Remove source_env handler (no longer used in any codepath). Jeremy. (This used to be commit 3a3e33603084048e647af86a9badaaf49433c789)
2003-12-05fix %a variable for Windows 2003 -> Win2K3Gerald Carter1-10/+14
(This used to be commit 2f43a1c166dfc8679a9d03bd0f3cf9303aafcf74)
2003-11-18Remove unneeded second open for filename ending in '.' now we know it'sJeremy Allison1-1/+1
a mangled name. Added const. Fix inspired by Andrew Bartlett ideas. Jeremy. (This used to be commit 87eb336d659dfa5e92b495dd76a0f2e534931293)
2003-11-06Undo accidentally committed stuff.Tim Potter1-111/+0
(This used to be commit 0a79519bc4b92b2f6e88b921d5ede761cc8ee2af)
2003-11-06Ignore tallocdump binary.Tim Potter1-0/+111
(This used to be commit addeb1c6c90faf5842db4a75f8db8d2325905b03)
2003-11-03Fix more 64-bit printf warnings.Tim Potter1-1/+2
(This used to be commit 23443e3aa079710221557e18158d0ddb8ff48a36)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-65/+3
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-08-15get rid of compiler warningsHerb Lewis1-1/+1
(This used to be commit ae25e7746e87409aae554d390753c7a3e3717052)
2003-08-12Fix for bugid #205 - work by Andrew Bartlet (modified to useJeremy Allison1-10/+1
fixed buffer by me). Jeremy. (This used to be commit 6f68b8de4760a2103eae0a51b2aca356990ea526)
2003-08-01Update my copyrights according to my agreement with IBMJim McDonough1-1/+1
(This used to be commit c9b209be2b17c2e4677cc30b46b1074f48878f43)
2003-08-01Fix copyright statements for various pieces of Anthony Liguori's work.Jim McDonough1-1/+1
(This used to be commit 15d2bc47854df75f8b2644ccbc887d0357d9cd27)
2003-07-23convert snprintf() calls using pstrings & fstringsGerald Carter1-1/+1
to pstr_sprintf() and fstr_sprintf() to try to standardize. lots of snprintf() calls were using len-1; some were using len. At least this helps to be consistent. (This used to be commit 9f835b85dd38cbe655eb19021ff763f31886ac00)
2003-07-14Jeremy requested that I get my NTLMSSP patch into CVS. He didn't requestAndrew Bartlett1-0/+11
the schannel code, but I've included that anyway. :-) This patch revives the client-side NTLMSSP support for RPC named pipes in Samba, and cleans up the client and server schannel code. The use of the new code is enabled by the 'sign', 'seal' and 'schannel' commands in rpcclient. The aim was to prove that our separate NTLMSSP client library actually implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation, in the hope that knowing this will assist us in correctly implementing NTLMSSP signing for SMB packets. (Still not yet functional) This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with calls to libsmb/ntlmssp.c. In the process, we have gained the ability to use the more secure NT password, and the ability to sign-only, instead of having to seal the pipe connection. (Previously we were limited to sealing, and could only use the LM-password derived key). Our new client-side NTLMSSP code also needed alteration to cope with our comparatively simple server-side implementation. A future step is to replace it with calls to the same NTLMSSP library. Also included in this patch is the schannel 'sign only' patch I submitted to the team earlier. While not enabled (and not functional, at this stage) the work in this patch makes the code paths *much* easier to follow. I have also included similar hooks in rpccleint to allow the use of schannel on *any* pipe. rpcclient now defaults to not using schannel (or any other extra per-pipe authenticiation) for any connection. The 'schannel' command enables schannel for all pipes until disabled. This code is also much more secure than the previous code, as changes to our cli_pipe routines ensure that the authentication footer cannot be removed by an attacker, and more error states are correctly handled. (The same needs to be done to our server) Andrew Bartlett (This used to be commit 5472ddc9eaf4e79c5b2e1c8ee8c7f190dc285f19)
2003-07-10Add constVolker Lendecke1-1/+1
(This used to be commit 2f7658d9ba1f43fb2d14adc4af7b681634ab5cb2)
2003-07-03Removed strupper/strlower macros that automatically map to ↵Jeremy Allison1-9/+9
strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
2003-06-25large change:Gerald Carter1-0/+1
*) consolidates the dc location routines again (dns and netbios) get_dc_list() or get_sorted_dc_list() is the authoritative means of locating DC's again. (also inludes a flag to get_dc_list() to define if this should be a DNS only lookup or not) (however, if you set "name resolve order = hosts wins" you could still get DNS queries for domain name IFF ldap_domain2hostlist() fails. The answer? Fix your DNS setup) *) enabled DOMAIN<0x1c> lookups to be funneled through resolve_hosts resulting in a call to ldap_domain2hostlist() if lp_security() == SEC_ADS *) enables name cache for winbind ADS backend *) enable the negative connection cache for winbind ADS backend *) removes some old dead code *) consolidates some duplicate code *) moves the internal_name_resolve() to use an IP/port pair to deal with SRV RR dns replies. The namecache code also supports the IP:port syntax now as well. *) removes 'ads server' and moves the functionality back into 'password server' (which can support "hostname:port" syntax now but works fine with defaults depending on the value of lp_security()) (This used to be commit d7f7fcda425bef380441509734eca33da943c091)
2003-06-17Const fixes by metzeVolker Lendecke1-2/+2
Volker (This used to be commit c0e35f3be8a33f19823826c5a84c885764c62508)
2003-05-27Fixed unused variable warning.Tim Potter1-1/+2
(This used to be commit cdbe47a5d517eea95186aecdc3327160236a5d09)
2003-05-12Add NT quota support. Patch from Stefan (metze) MetzemacherAlexander Bokovoy1-0/+13
1. Allows to change quota settings for shared mount points from Win2K and WinXP from Explorer properties tab 2. Disabled by default and when requested, will be probed and enabled only on Linux where it works 3. Was tested for approx. two weeks now on Linux by two independent QA teams, have not found any bugs so far Documentation to follow (This used to be commit 4bf022ce9e45be85609426762ba2644ac2031326)