summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
AgeCommit message (Collapse)AuthorFilesLines
2003-11-11fix crash bug due to empyrt munged dial string; patch from metzeGerald Carter1-1/+1
(This used to be commit ccd5665a65de6ccfdb9a5f490be1a7b5de486e2a)
2003-11-07Handle munged dial string. Patch from Aur?lien Degr?mont ↵Jeremy Allison1-0/+21
<adegremont@idealx.com>with memory leak fixes by me. Jeremy. (This used to be commit e591854eda8568ed1a4ad6b9de64e523c02b4392)
2003-09-25Fix for #480. Change the interface for init_unistr2 to not take a lengthJeremy Allison1-49/+49
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string. This is not the case. Count it after conversion. Jeremy. (This used to be commit f82c273a42f930c7152cfab84394781744815e0e)
2003-05-26Metze's patches:John Terpstra1-35/+35
here's a small patch which renames the symbol 'log' to some better names to avoid compiler warnings about shodow global var 'log' in proto.h we now have a GLOBAL_SECTION_SNUM -1 so we should use it in swat too:-) (This used to be commit a4733a0748b4d24457558304ad47852c69905cb2)
2003-03-17Merge from HEAD:Andrew Bartlett1-3/+3
signed/unsigned (mostly i counters) a little bit of const. Andrew Bartlett (This used to be commit 50f0ca752e5058c4051f42a9337361373ba1f727)
2003-01-28Merging tridge's privillage client changes from HEAD.Jeremy Allison1-5/+36
Jeremy. (This used to be commit 30a33920b4d834edc877cc0080291fbda983083a)
2003-01-15merging some rpcclient and net functionality from HEADGerald Carter1-0/+49
(This used to be commit 7a4c87484237308cb3ad0d671687da7e0f6e733b)
2003-01-03Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett1-34/+34
warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2002-12-20Forward port the change to talloc_init() to make all talloc contextsJeremy Allison1-1/+1
named. Ensure we can query them. Jeremy. (This used to be commit 09a218a9f6fb0bd922940467bf8500eb4f1bcf84)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-16/+15
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
2002-11-07Being tpot's janitor again.... checking in things only checked into HEAD.Jeremy Allison1-3/+4
We are meant to be keeping 3.0 up to date... Jeremy. (This used to be commit a4c8c8f3b767f0cd4c1fa977efe8bfcd3de980d0)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-3/+0
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-5/+48
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-02more constAndrew Bartlett1-2/+2
(This used to be commit f0b16b7b515296d0e687e084564fe0718f189dc8)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-12-31Give the main loop talloc context a name (using mbp's new talloc namingAndrew Bartlett1-1/+1
system). Andrew Bartlett (This used to be commit f0c301a12eb142add488a2da55591269dfc15f77)
2001-12-05Const religion for some of the RPC code.Andrew Bartlett1-1/+1
(This used to be commit 64bf8f81c49744fc0653db655e457981f3bcbac2)
2001-11-21samr_querydom_info level 1: found the meaning of the unknow fields. AndJean-François Micouleau1-6/+6
discovered that our reply is short by 4 bytes since day 1 of this code. Added a decode function to rpcclient too. splitted the STRING2 fields filling while trying to understand the win9x userlist bug. (didn't fix the bug, but the reply looks closer to NT). J.F. (This used to be commit bfbe7f377e5fcb09e87bfc866196dfc51a8fe64d)
2001-10-02Fixed the bug with member servers in a Samba PDC hosted domain not allowingJeremy Allison1-0/+1
other access. Problem was max time was being set to 0xffffffff, instead of 0x7fffffff. Jeremy. (This used to be commit 94403d841710391ec26539e4b4157439d5778ff7)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-3/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-08-31Fix up some compile issues. We can't have C99 comments and add a smatteringAndrew Bartlett1-1/+1
of const. (This used to be commit af53e774d754d72b01d9840e8b45d27bc394e33d)
2001-08-28Merge of sam sync code from TNG.Tim Potter1-0/+64
Reverse-engineered the sam replication protocol from staring at hex dumps for a while. It's pretty similar to the sam sync protocol with a couple of different delta header types. I wasn't able to figure out the format of the privilege stuff - needs more time and a whiteboard. (-: The impressive bit is that the sam sync stuff from tng basically just worked thanks mainly to Luke Leighton's efforts in this area. (This used to be commit 3a60cb44f22d5f3f8c78a56ed8f5ea4794cd7ab3)
2001-08-03This is my 'Authentication Rewrite' version 1.01, mostly as submitted toAndrew Bartlett1-1/+1
samba-technical a few weeks ago. The idea here is to standardize the checking of user names and passwords, thereby ensuring that all authtentications pass the same standards. The interface currently implemented in as nt_status = check_password(user_info, server_info) where user_info contains (mostly) the authentication data, and server_info contains things like the user-id they got, and their resolved user name. The current ugliness with the way the structures are created will be killed the next revision, when they will be created and malloced by creator functions. This patch also includes the first implementation of NTLMv2 in HEAD, but which needs some more testing. We also add a hack to allow plaintext passwords to be compared with smbpasswd, not the system password database. Finally, this patch probably reintroduces the PAM accounts bug we had in 2.2.0, I'll fix that once this hits the tree. (I've just finished testing it on a wide variety of platforms, so I want to get this patch in). (This used to be commit b30b6202f31d339b48d51c0d38174cafd1cfcd42)
2001-07-11This backs out my last change, which broke some of the finer points of RPCAndrew Bartlett1-54/+0
coding :-). I'll be more carfull in this area in future. This does not back out the cli_login change, so domain logons still work, but only for english. Andrew Bartlett (This used to be commit bd3c2a0cddc71daa4165e1a0916208d0c650d55a)
2001-07-10This fixes security=domain, which has been broke since the big charsetAndrew Bartlett1-0/+54
changeover. For my own sainity I have created a new function to fill out both the header and buffer for a string in an RPC struct. This DOES NOT take a length argument, only the actual string to be placed. The RPC code is currently littered with code that does init_uni_hdr() followed immidiatly by init_unistr2(), and often the length argument is wrong. (It was for the code I changed, even before the charset stuff). Another bug where we made strings AT LEAST MAX_UNICODE_LEN long hid this bug. This works for loopback connections to Samba, and can't be any more broke than it was before :-). (We had double and revese conversions, fun...). In particular this makes us multibyte complient. In any case, if there are no objections I will slowly convert other bits of code to the same system. (This used to be commit cf1d1cd9d6362f6e32ed9c2f6d2f6f25c47705ad)
2001-07-09when converting ascii to unicode, if the ascii string is NULL, don'tJean-François Micouleau1-0/+7
convert it, rpcstr_push doesn't like it. (This used to be commit a8006e6f3eb1e06f4d48727de31e1229d6eef58a)
2001-07-04The big character set handling changeover!Andrew Tridgell1-9/+6
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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-05-01Added code from "Nigel Williams" <nigel@veritas.com> (yes, the same famousJeremy Allison1-0/+31
Nigel Williams who did NIS/GINA !) to implement add/modify/delete shares for Win2k. Needs testing as I made a few mods to the original code. Jeremy. (This used to be commit 9b3dd801765fad28c0f9d58e5af2537cfccdd4ee)
2001-03-07Sync up handle creation with 2.2 branch. We can now join AS/U domains andJeremy Allison1-1/+12
authenticate against them. Big/little endian issues fixed. Jeremy. (This used to be commit 0e6a34510ed598eaec7fe71a9c91fda528a4675c)
2001-02-27Added total memory allocated counter to talloc, so we can tell if a tallocJeremy Allison1-39/+64
pool is getting bloated. Also added a talloc_zero function to return zeroed memory. Added debug in rpc_server/srv_pipe_hnd.c so we know when a talloc pool is being freed. Syncup with srv_pipe_hnd.c from 2.2 so we are freeing memory at the same time. Jeremy. (This used to be commit d3a56c6042acf037bbd53de88d7636a5803ead20)
2001-01-25Fixed "object picker can't determine if object in domain" bug seen from W2KJeremy Allison1-60/+0
clients. Did this by importing Samba-TNG code that correctly handles LSA lookups. *MANY* thanks to Luke, Sander, Elrond and the rest of the TNG gang ! Jeremy (This used to be commit f76dc952f70862a6a390e9f35edd651867842a01)
2000-12-15lib/util_unistr.c:Jean-François Micouleau1-10/+7
rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes. rpc_parse/parse_misc.c: rpc_parse/parse_prs.c: rewrote of BUFFER5 handling to NOT byteswap when it was already in network byte order. rpc_parse/parse_samr.c: cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2 bytes. rpc_server/srv_lsa.c: UNISTR2 strings need to be NULL terminated to pleased W2K. rpc_server/srv_spoolss_nt.c: use snprintf instead of safe_strcpy as we want the string truncated at 32 chars. That should fix SUN and SGI box not able to act as printserver and the problem with joining from a W2K wks. J.F. (This used to be commit 69fe739303b105f2c488f266f13977da1b6b201d)
2000-12-15Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. MergedJeremy Allison1-4/+4
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy. (This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14)
2000-12-08Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions fromTim Potter1-4/+4
TNG branch. Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient. This requires most samba binaries to link in another handful of object files due to uncessary coupling between modules. )-: (This used to be commit 817819d0cc3ecf642be5a1656be3b71bed260ee4)
2000-11-10printing/nt_printing.c: use getpwuid not smbgetpwuid. Canonicalize printernames.Jeremy Allison1-0/+2
printing/printing.c: Insure fix for malloc of zero. rpc_parse/parse_misc.c: Enusre UNISTR's are zero filled. rpc_parse/parse_spoolss.c: Correct INFO_6 - differs between pre-releases of W2K and shipping build. rpc_server/srv_spoolss_nt.c: Canonicalize printernames. Jeremy. (This used to be commit b17e23a8ff2b44540726968355a4b7e26f244f3b)
2000-10-04Adding Herb's compile warning fixes to HEAD.Jeremy Allison1-1/+1
Jeremy. (This used to be commit d131ad1ce3f6e72e295f865a463f8dcbfa6f8d42)
2000-08-17added comment for my own memory purposesGerald Carter1-0/+1
jerry (This used to be commit b64ddbd1aaba8811641e502e96f3bbef01171f52)
2000-08-16- fixed memcpy bug in copy_unistr2()Gerald Carter1-7/+21
- init_unistr2_from_unistr() does not NULL terminate the buffer --jerry (This used to be commit 65ee5f9b6ed3c4ad33fefd3c879f2649496fd3f3)
2000-08-11Fixed the problem with UNISTR marshalling in a buffer5 struct.Jeremy Allison1-7/+4
The smb_io_unistr() code called a prs_align, this was not being counted in the size or taken account of in the offset calculation. Fixed size_ calculation to always return a size a multiple of 4 and also set the offset correctly. This fixes the problem I saw and will hopefully fix the problem HP reported. JF please check this change. Jeremy. (This used to be commit ceba9f3dcdb4bddae17ec0024692c9074086302d)
2000-08-09More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter1-3/+14
Also fixed init_unistr() to deal with a NULL source character string. -jerry (This used to be commit 8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
2000-08-08cleanup in init_unistr2_from_unistr()Gerald Carter1-27/+19
--jerry (This used to be commit 1e00ac19cd001024fa8007eff5137aac877796fa)
2000-08-05it is not my day it seems. :-(Gerald Carter1-1/+1
Fixed missing ) j- (This used to be commit 7b69cbbde36e51f8f7b74691428a04e8871d8b4a)
2000-08-05removed the for() loop to copy the buffer in init_unistr2_from_unistr()Gerald Carter1-3/+2
Replaced with a memcpy() Forgot to commit this a few moments ago j- (This used to be commit 34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
2000-08-05Fixed bug in init_unistr2_from_unistr() found by Elrond.Gerald Carter1-1/+1
Thanks :-) j- (This used to be commit 4ecd15cd5851e94808756e3da0ce6a066f0a0cd7)
2000-08-04After talking with Jeremy and JF (and staring at packet traces betweenGerald Carter1-2/+52
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL terminated. jerry (This used to be commit c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
2000-07-28Fixed read overrun in init_string2()Tim Potter1-2/+4
(This used to be commit 4ab75143c4466ad0ea8443512dd5ade449d72462)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-69/+121
in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-06-01More insure found memory leak and corruption fixes.Jeremy Allison1-0/+9
Jeremy. (This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
2000-06-01Back to building. Now to test with insure.Jeremy Allison1-1/+1
Added some frees needed to stop memory leaks. Jeremy. (This used to be commit eba31e4e802120c9eb8c4688f521b4de9cb91f5c)
2000-06-01Getting back to a compilable state (not there yet but close).Jeremy Allison1-3/+3
Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy. (This used to be commit c2099cfb033c2cdb6035f4f7f50ce21b98e1584d)