summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
AgeCommit message (Collapse)AuthorFilesLines
2000-03-29rewrote getprinterdriver level 3, now correctly handle the dependentJean-François Micouleau1-1/+1
files. A number of memleak fixed some error return values fixed. J.F. (This used to be commit c212fbe009fe556d5329b5d7106159cf21402d82)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison1-26/+0
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. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-22added the following message to all dce/rpc client/server code, exceptLuke Leighton1-0/+26
the spoolss code (it's cut from TNG) and the smb-dce/rpc interface code that jeremy has been working up to TNG-functionality. i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE, because it is intolerable that potentially good modifications be made to code that is going to be thrown away, and people waste their time fixing bugs and adding enhancements that have already been carried out already, up to two years ago in the TNG branch. /* * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY, * INCOMPLETE. PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH. * * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY. * * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH * * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG. * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT * MAY BE LOST. * * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST. * * THANK YOU. * * lkcl@samba.org */ (This used to be commit cfaea90529be222f8df0e20a7ca1289f99c29e09)
2000-02-07spoolss definitions.Jean-François Micouleau1-0/+25
also added some prs_struct functions, 'cause I'm handling buffers as prs_struct. J.F. (This used to be commit 81e375bbbe0fb022a44a2aaaa3729a9518b7a854)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-673/+674
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-12-01damn, that took a while. nt login password was being stored incorrectlyLuke Leighton1-4/+6
in private .mac file (oops). ntlogin test now works. (This used to be commit c98c66690683965612e9631d77c2dff91ec8a872)
1999-11-23attempted a svcset command. password is encrypted / messed up, thereforeLuke Leighton1-8/+29
command fails. (This used to be commit 9193f0eff56399e9bc09787dbe785b603886eaa3)
1999-11-16attempting to get nt5 wksta to join domain.Luke Leighton1-0/+30
1) had to fix samr "create user" and "set user info" (level 23). 2) had to fix netlogon enum trust domains 3) registry key needed \\ in it not \. (This used to be commit 70b2c1ecbb4fbbb86fea676c80754485aae5ab13)
1999-11-08const feeding frenzyLuke Leighton1-1/+1
(This used to be commit e0eb390ab3e2a0cce191e78ea4ff90d088a8895c)
1999-11-03created msrpc_srv_enum_tprt() function by massaging cmd_srv_enum_tprt().Luke Leighton1-1/+1
(This used to be commit 3f9455c535607090103a371ff96051a5ce32e461)
1999-11-03had to move unistr2_dup(), unistr2_free() and unistr2_copy() intoLuke Leighton1-34/+0
util_unistr.c in order to get bin/testparm to compile. (This used to be commit e718ce9c4a3598483e38b8c32bdf2924593edc1e)
1999-11-03three types of array-creation / array-deletion functions:Luke Leighton1-1/+19
char* UNISTR2* SID* decided to create a higher-order function set, add_item_to_array() free_item_array(). higher-order support routines needed to add a new type: type* item_dup(const type*) void item_free(type*) of course, strdup() and free() are perfect, pre-existing examples of such functions, used in the implementation of add_chars_to_array() and free_char_array(). sid_dup() and free() work for the add_sids_to_array() and free_sid_array() implementations. use unistr2_dup() and created unistr2_free() because the functionality behind these may change into something horrible, like [horror] dynamic memory allocation of the UNISTR2 character array. argh!!!! jean-francois, this function set implements what we talked about over... a year ago, now :-) (This used to be commit a80ea2eb47d298095eb6e5b0455309daa3a631cb)
1999-10-30NetServerTransportEnum parsing, client-side and rpcclient "srvtransports" added.Luke Leighton1-0/+16
(This used to be commit 37f4aac06fec3fbb34ed40d1010829b2e1f28558)
1999-10-25- typecast malloc / Realloc issues.Luke Leighton1-3/+4
- signed / unsigned issues. (This used to be commit c8fd555179314baf1672a23db34dc8ad9f2d02bf)
1999-10-15return results on prs_xxxxx() and all xxx_io_xxx() routines.Luke Leighton1-104/+236
the whole task is not complete, yet. xxx_io_xxx() routines that _call_ xxx_io_xxx() routines not done. prs_xxxx() covered by macros. considering doing xxx_io_xxxx in the same way. (This used to be commit 3b583f7be51434af98bc52b48dfa42c4602a3094)
1999-09-14wow!!!! this one's been here for two years!!!! alignment issuesLuke Leighton1-0/+2
in smb_io_dom_query() where the string name could mis-align! added a call to prs_align() after the domain string name. (This used to be commit 1d05d2c959f41fffb9a85d161b9b64c957ee90e7)
1999-08-03reverted jeremy's c++-like security descriptor modifications as theLuke Leighton1-5/+3
simplest method to get rpcclient's reggetsec command working. the buffers passed as arguments in do_reg_get_key_sec() do need to be locally allocated not dynamically allocated, as two calls to reg_get_key_sec() are needed. on the first, the server fills in the size of the security descriptor buffer needed. on the second, the server fills in the security descriptor buffer. (This used to be commit b2d9cbef6f65bb696df8d8f49aa0c240e0bb1f50)
1999-04-27rpc_parse/parse_misc.c : defined a new BUFFER5 structJean-François Micouleau1-0/+65
include/ntdomain.h : added rpc_spoolss.h include statement include/proto.h include/rpc_dce.h : added definition of RPC_ALTER_CONTEXT request & reply param/loadparm.c : 2 new options for NT printing support and some changes to initial values in the LPRNG case. rpc_parse/parse_prs.c : added prs_uint16s() rpc_parse/parse_rpc.c : added SYNT_SPOOLSS_V1 and code for the alter-context support. rpc_server/srv_pipe.c : alter-context support smbd/nttrans.c smbd/server.c include/rpc_misc.h Makefile.in include/smb.h Jean Francois (This used to be commit 4c515804b70254248e378a3f90f47e4c32639d29)
1999-04-11Incorrect length (number of unicode characters rather than buffer size)Matthew Chapman1-1/+1
passed to ascii_to_unibuf in make_buffer2 was breaking User Manager. (This used to be commit c518cef78d53a76451e5ea0ac93d75930306fa47)
1999-04-08Mainly BDC-related changes.Matthew Chapman1-33/+66
* Added SEC_CHAN_BDC * Propagate sec_chan into the various functions which change trust account passwords, so they can be used for domain control and inter-domain trusts. * Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. A BUFFER2 is really a "unibuf" in my terminology and we should treat it as such. * Added some more common NT structures (BIGINT, BUFHDR2, BUFFER4). * Added NET_SAM_SYNC (-> NetDatabaseSync2) RPC for account replication. Still experimental and incomplete, with a few too many NULL security descriptors lying around (must go look at Jeremy's SD code). Haven't worked out password encryption yet either. However, the XXX_INFO structures I've added to rpc_netlogon.h are quite nice as they give some insight into how these objects are stored in the SAM. (This used to be commit 7b830350eb54dc9d357c115e12ddf9a0633527ac)
1999-03-25SAM database "set user info".Luke Leighton1-10/+0
---------------------------- - removed DOM_RID4 - removed SAMR_UNKNOWN_32 - added SAMR_SET_USERINFO (opcode 0x32) - added level 0x1 to SAMR_QUERY_DOM_INFO (needed for create user) - fixed pwdb_gethexpwd() it was failing on XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - added mod_sam21pwd_entry() - preparing to call mod_sam21pwd_entry() - added "user session key" to user_struct.dc. this is md4(nt#) and is needed to decode user's clear-text passwords in SAMR_SET_USERINFO. - split code out in chgpasswd.c to decode 516 byte password buffers. (This used to be commit 2e58ed742435befe419aa366c4052019fede8c23)
1999-03-24removed 2 unnecessary args from make_uni_hdr.Luke Leighton1-5/+5
(This used to be commit f84dede27e16a5f02ee6d02fe2d16f2661c65470)
1999-03-23Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.Matthew Chapman1-7/+5
(This used to be commit 73730f6004c7eca1d852a569dede94095a396dca)
1999-03-18Adding LSA_OPENSECRET (-> LsarOpenSecret) and LSA_QUERYSECRETMatthew Chapman1-0/+31
(-> LsarQuerySecret) on client side, including rpcclient command "querysecret" for others to play with. The major obstacle is working out the encryption algorithm used for the secret value. It definitely uses the NT hash as part of the key, and it seems the block size is 64 bits - probably DES based - but I can't work out what's done in between. Help required. (This used to be commit 365fa3b5fbf551670acc91f593138a7e91a5f7fa)
1999-03-12new "domtrust" test command. r&d into inter-domain trust accounts.Luke Leighton1-2/+3
(This used to be commit 65b0abe8b7594ff6c662da86dc2e35bd83a2d13d)
1999-02-23added jeremy's new c++-like code for parsing of security descriptors.Luke Leighton1-4/+5
(This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8)
1999-02-15Always null-terminate strings.Matthew Chapman1-1/+1
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-6/+5
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)
1999-02-11the UNICODE issue...Luke Leighton1-3/+3
(This used to be commit 73db80f34183324845407b00f58462ff2d7b47ea)
1999-02-09removal of the use of unistrn2 function: replace it with unistr2_to_strLuke Leighton1-2/+2
which is more appropriate. (This used to be commit ac72fe1ab3d10f64a5945ccbd4ed3817e30f9f7b)
1999-02-08UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()Luke Leighton1-3/+3
(This used to be commit 9084b7e33dfe717bd8d5604ee71d137e3baef0f5)
1998-12-09adding some enumerate services code, client and server.Luke Leighton1-1/+0
(This used to be commit dacf5b152bf74cc3ee9a816911384a5eb0e77afa)
1998-12-07- lib/unix_sec_ctxt.cLuke Leighton1-2/+2
attempt at taking lib/uid.c and getting a unix security context change module that is independent of "cnums" and "snums". a security context is needed for pipes, not just IPC$ or other services. - group database API added add_group/alias_member, del_group/alias_member, del_group/alias_entry functions. del_builtin_entry() is deliberately set to NULL to cause an exception, you cannot delete builtin aliases. - parse_lsa.c srv_lsa.c fixed lookup_names code, it was a load of trash and didn't do anything. - cmd_samr.c rpcclient.c srv_samr.c added "deletegroup", "deletealias", "delaliasmem", "delgroupmem", "addgroupmem", "addaliasmem", "createalias", "creategroup", to both client and server code. server code calls into unix stubs right now, which don't actually do anything. the only instance where they are expected to do anything is in appliance mode NOT even in the ldap code or anything. client code modified to call samr_lookup_names() for group code (because we can) and lsa_lookup_names() for alias code (because we have to). - srv_lookup.c oops, lookup on unsplit name, we got lookup on DOMAIN, DOMAIN\name instead of DOMAIN, name. (This used to be commit b8175702ef61b8b37b078f38e81452c00a5e2986)
1998-12-02added rid and sid_name_use to DOMAIN_GRP_MEMBER, for use in group memberLuke Leighton1-1/+1
query. domain groups now work, hurrah! only thing is that the description is one character long, don't know why (which is wierd in itself). (This used to be commit 78a86c64960a7823b0db8b7bebfffabb4a5ba864)
1998-12-02adding group member code, made a start. found that the group members'Luke Leighton1-1/+2
rid is needed not the name (see DOMAIN_GRP_MEMBER) decided to go home. (This used to be commit 9337049dfc98becfa74522d418dae64a97c7a304)
1998-11-29weekend work. user / group database API.Luke Leighton1-54/+0
- 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-25LsaLookupNames client call (first used as lookupnames command in rpcclient).Luke Leighton1-9/+2
(This used to be commit 68342a29a892e515cf2b22d759476d61944bcd59)
1998-11-23unix instance of group database APILuke Leighton1-1/+1
(This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078)
1998-11-12jean-f. sent me some S-1-3-0,1,2,3 SIDs and names. S-1-3 doesn't exist.Luke Leighton1-3/+2
security descriptor testing. hey wow, you can get a SD then send it back! (This used to be commit 7466c3113ef8f8a89b8496efadfeb611c9f3e069)
1998-11-12security descriptors and registry.Luke Leighton1-0/+37
(This used to be commit 9814ac8a65f4d8333527976f1d227e8cd3c2c8ce)
1998-11-10include/local.h:Jeremy Allison1-1/+1
include/smb.h: param/loadparm.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-). printing/printing.c: Added J.F.'s latest fix. rpc_parse/parse_misc.c: parse_reg.c: rpcclient/cmd_reg.c: rpcclient/display.c: SGI compiler signed/unsigned issues. smbd/reply.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-). utils/testparm.c: Added extra test. Jeremy. (This used to be commit 9668a5ef50be2e6b575f9989e87ee2ff8da5ac1d)
1998-11-10rpcclient registry commands.Luke Leighton1-31/+140
(This used to be commit 36fcb4a6e643a05d06a2a273d74318fee7f2c647)
1998-10-28Added clear-out-structure fix for make_unistr2.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 2bce2cf6d83d9889d8b116f9d2ee254b7ceb4828)
1998-10-27amazing. the improvements to NT continue, evidence for which shows upLuke Leighton1-9/+9
now as "RPC fault" if the UNIHDR structure lengths do not exactly match up to the length of the data stream. so, all versions of samba prior to this one have an off-by-one bug in unicode string lengths. all versions of NT prior to NT 5 beta 2 could possibly have buffer problems when receiving badly formatted UNICODE strings. (This used to be commit 161eb6f511e161b63c1fa90a08c562fcf208344a)
1998-09-25added in samr commands. assistance in returning the missing functions,Luke Leighton1-0/+54
automatically removed because they were "unused", would be appreciated. (This used to be commit d0f7b0d915973ccb85409af3d6d951a716cd66d2)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-36/+21
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-07-06password.c: Fixes to allow Win95 clients to have lm encrypted passwordsJeremy Allison1-7/+8
recognised. lib/rpc/client/cli_login.c: Fix debug comment. lib/rpc/parse/parse_misc.c: Fix for passing null pointers. lib/rpc/parse/parse_net.c: Send correct password lengths when called from Win95. Jeremy. (This used to be commit ad1848b35521b3d478ea3226db818a1edef78254)
1998-06-09I was wrong about the length and max_length values in make_unistr2.Jeremy Allison1-3/+1
Jeremy. (This used to be commit 1d77728bbba49699a05eb70b685a4a97d7598122)
1998-06-09loadparm.c: Removed 'domain other sids' parameter.Jeremy Allison1-1/+3
lib/rpc/include/rpc_lsa.h: Changed #defines for RPC calls - moved some, made LSA_LOOKUPNAMES correct. lib/rpc/include/rpc_misc.h: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. Changed bitmasks for uid to rid to be 1 bit. lib/rpc/parse/parse_misc.c: Changed make_unistr2 to put length as given, max length as one more. lib/rpc/server/srv_netlog.c: Removed 'domain other sids' parameter. lib/rpc/server/srv_samr.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. lib/rpc/server/srv_util.c: Changed DOMAIN_ALIAS_xxx to BUILTIN_ALIAS_xxx. Jeremy. (This used to be commit 34c91840a3d8c252715dc2f749b7a3b171a5b74f)
1998-05-14chgpasswd.c: Added comments to #ifdefsJeremy Allison1-58/+3
ipc.c: Caused samba password changing not to be done if UNIX password changing requested and not successful. util.c: Added string_to_sid() and sid_to_string() functions. lib/rpc/client/cli_samr.c: lib/rpc/include/rpc_misc.h: lib/rpc/parse/parse_lsa.c: lib/rpc/parse/parse_misc.c: lib/rpc/parse/parse_net.c: lib/rpc/parse/parse_samr.c: lib/rpc/server/srv_lsa.c: lib/rpc/server/srv_lsa_hnd.c: lib/rpc/server/srv_netlog.c: lib/rpc/server/srv_samr.c: lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs around as char *, they are converted to DOM_SID at the earliest opportunity, and passed around as that. Also added dynamic memory allocation of group sids. Preparing to auto-generate machine sid. Jeremy. (This used to be commit 134d6fa79c1b6b9505a2c84ba9bfb91dd3be76e5)