summaryrefslogtreecommitdiff
path: root/source3/include/rpc_samr.h
AgeCommit message (Collapse)AuthorFilesLines
2001-06-29From JF....Jeremy Allison1-8/+8
hi jeremy, can you commit the following patch against HEAD. I can't do it right now Thanks Tim for me. He changed the SAM_DISPINFO_1 array without checking if he didn't break the server code. And he did. So on my way I cleaned info_1, 2, .. 5 it may break winbind. I leave to tim the pleasure to fix it ;-) jf. I added some talloc changes and checks for alloc fails. Jeremy. (This used to be commit 001e9b7b540f04c80ba65c879aaa41acddc86f3e)
2001-06-29Removed another silly static array.Tim Potter1-2/+2
(This used to be commit 008628fb8ac9f92d984218f37fffdfa3cb9e3d62)
2001-06-20Fixed W2K SP2 joining a Samba PDC hosted domain.Jeremy Allison1-0/+53
Jermey. (This used to be commit 05a2911403a0710d994a618e72743205a3b0b87a)
2001-06-19INFO_24 sometimes has a 2 byte length, sometimes doesn't. Safer to notJeremy Allison1-1/+0
depend on it... Jeremy. (This used to be commit 0fe11c329f7b379299be65795031e4f1b14e0bec)
2001-06-15Add password length field to SAM_USER_INFO24 structure and fix initTim Potter1-0/+1
and parse function. (This used to be commit d2eafa7483a53958b6c930ca05da6e6a6c21b785)
2001-06-06Converted SAMR_Q_LOOKUP_NAMES structure to tallocated memory instead ofTim Potter1-2/+2
static arrays. (This used to be commit d122568b35f63e3da7bb1fad6a4e72922cf6bca3)
2001-05-04renamed unknown field to access mask in open alias structures.Tim Potter1-2/+2
(This used to be commit 4d0ac3c71d930ab9cf88bd688c23c72ce5a53179)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-9/+21
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-01-15New proto and some small changes to rpc_samr.hTim Potter1-17/+4
(This used to be commit 7f31d4ab1da72fe1dd52c7ecc1c758e210b6d38d)
2001-01-11Merge of various fixes from the tng headers.Tim Potter1-1/+1
(This used to be commit a6d4aad391d2a9e38cbb28d9ddc3e4ff454a759d)
2000-05-09the beginnings of a new scheme I've working on to allow an easierAndrew Tridgell1-285/+900
head/tng merge. It goes something like this: - headers from tng get copied over one at a time - the old headers get renamed to *_old.h - server side code that used the old headers gets a #define OLD_NTDOMAIN 1 #undef OLD_NTDOMAIN at the start and end of the code - mkproto.awk recognises these special defines and does magic stuff so that each .c file sees the right headers - we start moving the rpc client libraries from tng to head. if this goes OK then, in theory, we should be able to move the client side rpc code from tng to head without disturbing the existing head server side code. Then when that works we can consider merging the server side. it remains to be seen if this scheme will work. So far I've moved rpc_samr.h and don't seem to have broken anything. Note this this is still a very delicate operation, as at every step of the way I want to keep head fully functional. Please don't take part unless you discuss it with me first. (This used to be commit f76c037255a6a79d11bec65e863e009a41a4f0fd)
2000-01-17SAMR_R_UNKNOWN_38 is 3 uint16 params (4-byte aligned) followed by status code.Luke Leighton1-1/+0
(This used to be commit 55035b8984c135ddd2c4e3be18caf8833975841d)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-790/+187
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-11-18added samuserset2 rpcclient command to test ACB_XXX bit-setting onLuke Leighton1-2/+33
samr opcode 0x25. _yet_ another failed attempt to get nt5rc2 to join a samba domain. what _is_ it with this stuff, dammit? (This used to be commit c3913f8ae272c496fc4519141accf01ee9f1e49e)
1999-11-15added rpcclient "enumdomains" command. enumerates names of domainsLuke Leighton1-1/+31
for which a PDC is responsible. typical answers are: <Name of Domain> plus <Builtin>. against a hierarchical, down-level-compatible NT5 PDC, there's likely to be more than these two entries!!!!! (This used to be commit 3146aa6b6049a0d996e9abbe7dbee8526550e7e0)
1999-11-04samuserset <username> -p password. YESSSSS :)Luke Leighton1-0/+1
you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no). (This used to be commit f52504c553becc64b89d546a57b1bd9cf1bc5b5c)
1999-11-02dynamic mem allocation in enum dom groups and enum dom aliasesLuke Leighton1-4/+4
(This used to be commit baa789fabc45e62889755802fd8ec8c9191fe767)
1999-10-29more reshuffling of enum groups code. more higher order functions.Luke Leighton1-1/+1
(This used to be commit 497d4231723576390b10f5ea8704bd0af88d76ab)
1999-10-25one of those wonderful moments when running against a different MSRPCLuke Leighton1-6/+6
implementation (NT5) when you discover that your code is trash. samr_enum_dom_users(), samr_enum_dom_aliases() and samr_enum_dom_groups() all take a HANDLE for multiple-call enumeration purposes. (This used to be commit 19490d8b4fb8a103f3df4e6104f6f22937b0c518)
1999-10-21turning some of the rpcclient functions dynamic. this is likely toLuke Leighton1-2/+2
break a few things... (This used to be commit 4b06f303235d36903b6e9f55ee45b987d98256b0)
1999-10-21various. debug levels changed. nmbd doesn't need libsmb/clienttrust.c.Luke Leighton1-4/+4
samr_lookup_rids() moved to a dynamic memory structure not a static one limited to 32 RIDs. cli_pipe.c reading wasn't checking ERRmoredata when DOS error codes negotiated (this terminates MSRPC code with prejudice). (This used to be commit 8976eca2db43576c32069dcda017e8777048e007)
1999-09-21testing for attempts to get more info levels into samr_query_userinfoLuke Leighton1-0/+2
(This used to be commit cc19d5cc5c20665beb3b7c5fcf7787d54e37ea71)
1999-08-31matthew chapman identified 4 previously unknown samr functions.Luke Leighton1-4/+4
(This used to be commit 001b53866c819045bc52330cad5746e1a2f7a4b1)
1999-05-07the times in sam_user_info_23 may not be in the right orderLuke Leighton1-0/+1
(This used to be commit 34e623d607b45bce09ab2f98f3735cfbf5538dbf)
1999-03-29added SamrQueryDomainInfo call info level 0x3 for kix32.exe supportLuke Leighton1-1/+8
(This used to be commit ac070dfd39bfa9b60680855585155ce528ab7691)
1999-03-25added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is usedLuke Leighton1-0/+8
by "Welcome to SAMBA Domain". (This used to be commit 4aed18b5e1e2309c0f6931fbfdd604b01cb9498a)
1999-03-25SAM database "set user info".Luke Leighton1-31/+99
---------------------------- - 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-23dynamic memory allocation in samr enum dom users. works with 849 entries now.Luke Leighton1-2/+2
(This used to be commit 103557e26b071bf1e65e025ef5a52ccdbf483d02)
1999-03-19added a "createuser" command.Luke Leighton1-2/+29
(This used to be commit fefb4bf19181714cb73414febd6ee2ec10356cbe)
1999-02-24Win9x user level security.Matthew Chapman1-67/+158
* Added SAMR_LOOKUP_DOMAIN (-> SamrLookupDomainInSamServer) * Added real SAMR_ENUM_DOM_GROUPS (corresponding to SamrEnumerateGroupsInDomain). The existing one is just an alias for SamrQueryDisplayInformation (see below). * Added three extra info levels to SAMR_QUERY_DISPINFO. Info level 3 is what was previously SAMR_ENUM_DOM_GROUPS; info levels 4 and 5 are simple user/group list requests used by Win9x and I suspect (haven't checked) the "low speed connection" User Manager. * Added another two aliases for SAMR_QUERY_DISPINFO, opcodes 0x30 and 0x33. Usually the first is with info level 3 and the second 4 but there is some overlap so indeed these should be implemented as just aliases. * Return ERRDOS/ERRmoredata on extra data instead of STATUS_BUFFER_OVERFLOW for Win95's benefit. On a named pipe this results in an SMBreadX as usual. Still need to fix SAMR_QUERY_DOMAIN_INFO which has a hard-coded number of users and groups - which Win95 proceeds to truncate at. (This used to be commit 7d03e6e21908f3a759a4e65c5edd850622335e3e)
1999-01-29fix for enumerate domain users (bug spotted by sean matthews).Luke Leighton1-4/+3
also needed to use start index properly and generate next index. both client and server code need to recognise error code 0x105 when there's not enough room to store all the users in one call. sort this out another time. (This used to be commit ad58cdfac6b85d9431216e32e532ad4d60f9c6dd)
1998-12-08adding srvsvc pipe.Luke Leighton1-1/+18
(This used to be commit d06d6369942828ec89e90f99bd0d0d3f91d61d13)
1998-12-07bugs in rpcclient. add_aliasmem uses a DOM_SID2 not a DOM_SID.Luke Leighton1-1/+1
(This used to be commit 8a85d7abed317fd06e3e0026d4b9e088311eede4)
1998-12-07- lib/unix_sec_ctxt.cLuke Leighton1-18/+20
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-04added delete domain group and local group and delete domain group member.Luke Leighton1-0/+37
(This used to be commit bf15343def5b95ce4387ac4357674aff31431194)
1998-12-04- oops, i got "add alias member" and "delete alias member" swapped.Luke Leighton1-16/+15
- samr_enum_dom_users, the first 4 bytes is some sort of garbage, nt5-beta2 clears them out to zeros whereas nt4 does not. fixed bug where we were assuming that the first 4 bytes of a response _had_ to be non-zero. - cli_lsarpc.c: forgot to append the rid on the lsa_lookup_names() client call. - added in "addaliasmem" and "addgroupmem" commands. the addaliasmem command actually turned out to be a "delaliasmem" :-) :-) - parse_lsa.c: moved assert array check to after the size of useable array space is set... (This used to be commit 165b15a8cacc4bc7cf8cc0b9aaabb6b92cef7fdb)
1998-12-04- renamed do_samr_xxx to samr_xxxLuke Leighton1-17/+15
- renamed do_lsa_xxx to lsa_xxx - added "enumgroups [-m]" command, enumerates groups, shows members. - added cmd_sam_add_groupmem(), need to call these in rpcclient.c - added cmd_sam_add_aliasmem(), need to call these in rpcclient.c - modified "enumaliases [-m]" command - improved "enumgroups" and "enumaliases" to display names not just RIDS/SIDs. - renamed "samr_unknown_12" to "samr_lookup_rids". - added the following client-side functions: get_samr_query_groupmem() get_samr_query_aliasmem() get_samr_query_groupinfo() samr_enum_dom_groups() samr_enum_dom_aliases() samr_add_aliasmem() samr_add_groupmem() - improved display output (display.c) (This used to be commit eacc5e581af2b4de24186b9be3238b352c54effe)
1998-12-03added createalias command to rpcclientLuke Leighton1-1/+2
(This used to be commit 4771d5451b49375cc2fd4246d7d746b0d03cd5ba)
1998-12-03create domain group command (creategroup) added to rpcclient.Luke Leighton1-1/+2
renamed do_samr_xxxx to samr_xxxx. (This used to be commit 1e5d81c154740349a2cda4c1892b33a21c0683a8)
1998-12-03adding group parsing: add/modify/delete/add members.Luke Leighton1-5/+3
(This used to be commit 13a656b0e5c73e157b222765fb57a1bdafc67b80)
1998-12-02spotted the mistake in group_info1 parsing.Luke Leighton1-1/+2
(This used to be commit e39c0c76ae52bbd4539f8f254e78566a5511efc1)
1998-12-02added rid and sid_name_use to DOMAIN_GRP_MEMBER, for use in group memberLuke Leighton1-10/+10
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-15/+40
rid is needed not the name (see DOMAIN_GRP_MEMBER) decided to go home. (This used to be commit 9337049dfc98becfa74522d418dae64a97c7a304)
1998-12-01query_aliasmem code. it works (hurrah).Luke Leighton1-1/+3
(This used to be commit f7f2516df46dde1671235f788f7689c93d9395ae)
1998-12-01rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton1-6/+17
samr_query_aliasmembers (cool!) util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c : pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5) to obtain member and pdc sids. (This used to be commit 3e1eb4f26b67e484b05e1dde94fd4e4dae982631)
1998-12-01adding some samr parsing calls (group / alias adding / deleting)Luke Leighton1-32/+20
added code that moves MACHINE.SID to DOMAIN_NAME.SID if it exists. (This used to be commit 51c1c31768a92d9c57ee6c09b78419bcbc544f03)
1998-11-29weekend work. user / group database API.Luke Leighton1-35/+290
- 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-25yeehaah got users to be included in S-1-5-xxx-yyy-zzz's local groups.Luke Leighton1-8/+8
now need search capability on S-1-5-20, which will need argh, a "group database API" on S-1-5-20, and the ability to add BUILTIN\Admins etc to "local group map" argh. (This used to be commit a24f6eb00ba7486479cbcf7fadf5456521c56179)
1998-11-23unix instance of group database APILuke Leighton1-3/+3
(This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078)
1998-11-17- group database API. oops and oh dear, the threat has been carried out:Luke Leighton1-1/+1
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. (This used to be commit 0d21e1e6090b933f396c764af535ca3388a562db)