summaryrefslogtreecommitdiffstats
path: root/source/lsarpcd
Commit message (Collapse)AuthorAgeFilesLines
* rewrote policy handle code to be generic (it's needed for client-side too)Luke Leighton1999-11-241-5/+5
| | | | attempted to fix regsetsec command
* nt5rc2 falling over because the LsaQueryInfoPolicy() response _must_Luke Leighton1999-11-191-1/+2
| | | | | | | | | | | have the string max length = string length + 1. if not, then it gets its knickers in a twist over whether the string is NULL-terminated or not. four days. four days i spent on this one.
* added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1999-11-181-14/+38
| | | | | | | | reg_io_r_info() working properly. previously they weren't well understood (well, they were the first of the registry functions i did, back in december 97, ok??? :-) set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
* allan hourihane sent log 100 in which showed that some really old codeLuke Leighton1999-09-091-15/+4
| | | | | for lsa_close response was messing up. fixed by calling lsa_io_r_close() which i've been meaning to do for over eighteen months.
* commented location where lookup_sids(), a direct call to the passwordLuke Leighton1999-07-261-0/+3
| | | | | | | | | database API, needs to be replaced with over-the-wire (actually, tcp/ip loopback) to smbd. in fact, this is the location where, if we want to put in an nt5 ldap lookup system or netware NDS instead, we make the calls to resolve users-to-sids and vice-versa: NOT by replacing rpc_server/srv_samr.c.
* last part of RPC api change.Jean-François Micouleau1999-05-031-8/+8
| | | | | | and of rpcclient eventlog funtion Jean Francois
* removed 2 unnecessary args from make_uni_hdr.Luke Leighton1999-03-241-1/+1
|
* Fixed LSA Lookup Names. There were a few too many NULL pointers in aMatthew Chapman1999-03-241-13/+30
| | | | negative response, which tended to crash lsass.exe.
* Always null-terminate strings.Matthew Chapman1999-02-151-2/+2
| | | | Also some string length and sizeof(pointer) corrections.
* UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1999-02-121-2/+2
| | | | | | 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).
* fix for potential lsass.exe crashing due to negative response fromLuke Leighton1998-12-201-1/+1
| | | | | | LsaLookupNames being incorrect. this is a bit wierd: why would the lsass.exe on the nt _client_ crash due to an LsaLookupNames response from a samba _server_?
* added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids.Luke Leighton1998-12-141-1/+1
|
* - lib/unix_sec_ctxt.cLuke Leighton1998-12-071-48/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* - adding builtin[alias]db.Luke Leighton1998-11-301-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | - lib/sids.c: generate_sam_sid() modified to take a domain name: it now generates "DOMAIN_NAME.SID". reasons: 1) if you run multiple samba servers on the same machine under different netbios names as members of a domain, they won't all use the same SID, which is a _big_ mistake but it would happen _by default_. 2) we have (had) a problem with sid_to_string() and string_to_sid() which cause SIDs to be incorrectly read. one of the major reasons for *NOT* making this change was so as not to disrupt existing users. but as they will be anyway by this bug, we might as well go ahead. - passdb/smbpass.c: wanted to change the meaning of the name in the smbpasswd file to an "nt" name not a "unix" name. this is probably not a good idea: reverted this. - output formatting / bug-fixing in rpcclient query_useraliases code.
* LsaLookupNames client call (first used as lookupnames command in rpcclient).Luke Leighton1998-11-251-12/+12
|
* unix instance of group database APILuke Leighton1998-11-231-15/+19
|
* - group database API. oops and oh dear, the threat has been carried out:Luke Leighton1998-11-171-134/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pre-alpha "domain group" etc parameters have disappeared. - interactive debug detection - re-added mem_man (andrew's memory management, detects memory corruption) - american spellings of "initialise" replaced with english spelling of "initialise". - started on "lookup_name()" and "lookup_sid()" functions. proper ones. - moved lots of functions around. created some modules of commonly used code. e.g the password file locking code, which is used in groupfile.c and aliasfile.c and smbpass.c - moved RID_TYPE_MASK up another bit. this is really unfortunate, but there is no other "fast" way to identify users from groups from aliases. i do not believe that this code saves us anything (the multipliers) and puts us at a disadvantage (reduces the useable rid space). the designers of NT aren't silly: if they can get away with a user- interface-speed LsaLookupNames / LsaLookupSids, then so can we. i spoke with isaac at the cifs conference, the only time for example that they do a security context check is on file create. certainly not on individual file reads / writes, which would drastically hit their performance and ours, too. - renamed myworkgroup to global_sam_name, amongst other things, when used in the rpc code. there is also a global_member_name, as we are always responsible for a SAM database, the scope of which is limited by the role of the machine (e.g if a member of a workgroup, your SAM is for _local_ logins only, and its name is the name of your server. you even still have a SID. see LsaQueryInfoPolicy, levels 3 and 5). - updated functionality of groupname.c to be able to cope with names like DOMAIN\group and SERVER\alias. used this code to be able to do aliases as well as groups. this code may actually be better off being used in username mapping, too. - created a connect to serverlist function in clientgen.c and used it in password.c - initialisation in server.c depends on the role of the server. well, it does now. - rpctorture. smbtorture. EXERCISE EXTREME CAUTION.
* rpcclient registry commands.Luke Leighton1998-11-101-1/+1
|
* set netlogon negotiation flags to 0x1ff, not to what the client requests.Luke Leighton1998-10-231-9/+10
| | | | this is 0x4000 01ff on NT4 SP4, and 0x0000 01ff on pre-NT4 SP4.
* bug fix in lsa_trans_names.Luke Leighton1998-10-221-1/+3
| | | | | well-known aliases S-1-5-20 is actually S-1-5-0x20 but sid_to_string does decimal not hexadecimal oops.
* domain aliases added a bit better: does local aliases if you queryLuke Leighton1998-10-211-4/+4
| | | | | for sid S-1-5-20 and does (nothing at the moment) if you query for your own sid.
* bug-fixing against:Luke Leighton1998-10-151-0/+42
| | | | | | | | | | | | | | | | | | AS/U: it returns dce/rpc "first" and "last" bits _clear_ in a bind/ack response, when they should be set in a (small) packet. they also, in the bind/ack do not set a secondary address string at all, so we can't check against that... Win95: client-side dce/rpc code is a bit odd. it does a "WaitNamedPipeState" and has slightly different pipe-naming (\PIPE\LANMAN is joined by \PIPE\SRVSVC, \PIPE\WINREG etc whereas nt just has \PIPE\LANMAN and \PIPE\). Win95-USRMGR.EXE: added LsaOpenPolicy (renamed existing to LsaOpenPolicy2). added SamrConnect (renamed existing to SamrConnect2).
* lsa_lookup_sids command added. severe debugging needed on lookup_sidsLuke Leighton1998-09-301-60/+85
| | | | | | | | | code. added "quality of service" capability to lsa_open_policy code. different lsa_open_policy queries are *not* dealt with in the server code. answers like "0xC000 0022" - access denied - will have to be made to lsa_lookup_sids calls when a "quality of service" request is *not* specified in the lsa_open_policy call.
* Got very strict about the differences and uses ofJeremy Allison1998-09-291-30/+40
| | | | | | | uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy.
* use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() forAndrew Tridgell1998-08-261-1/+1
| | | | arrays. This prevents (harmless) warnings from some compilers
* Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison1998-08-241-4/+4
| | | | | have an ASSERT macro defined. Jeremy.
* added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1998-08-221-0/+8
| | | | in the rpc code.
* use ZERO_STRUCT() to initialise lots of structures.Andrew Tridgell1998-08-211-1/+30
| | | | | Luke, you need to do something similar in the rest of the rpc code. Have fun!
* De-coupled the mapping of a Windows to UNIX username from the Get_PwnamJeremy Allison1998-06-101-1/+12
| | | | | | | | | | | | username case conversion wrapper. It is now (very) explicit where we are mapping between an incoming Windows username, and when we are doing a UNIX password entry lookup, which may change the case of the given username. This makes things *much* clearer (IMHO:-) and will ease the adding of the 'groupname map' parameter, and the addition of the special 'jeremy' mode for Samba where unix users will not be needed. (We must think of a better name for it :-). Jeremy.
* more warnings, from Tim WindersLuke Leighton1998-05-241-1/+1
|
* - renamed some of the passdb.c functions: they have a prefix pdb_ on themLuke Leighton1998-05-181-1/+1
| | | | | - split smbpass.c "password file lock" routines into smbpassfile.c: moved trust account routines into smbpassfile.c as well
* Fixed dce/rpc to use global_machine_sid (auto generated in server.c ifJeremy Allison1998-05-141-10/+4
| | | | | not present in smb.conf). Jeremy.
* chgpasswd.c: Added comments to #ifdefsJeremy Allison1998-05-141-32/+43
| | | | | | | | | | | | | | | | | | | | | 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.
* "For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1998-03-111-0/+444
all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy.