summaryrefslogtreecommitdiff
path: root/source3/utils/net_sam.c
Commit message (Collapse)AuthorAgeFilesLines
* source3: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig2019-06-301-3/+6
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Update error check for new string conversion wrapperSwen Schillig2019-04-111-1/+1
| | | | | | | | | | | The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* utils: Use wrapper for string to integer conversionSwen Schillig2019-03-011-2/+3
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net: Use dom_sid_str_bufVolker Lendecke2018-12-111-5/+14
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net: Use dom_sid_str_bufVolker Lendecke2018-12-111-5/+10
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: utils: Convert all uses of uint32/16/8 to _t.Richard Sharpe2015-05-071-8/+8
| | | | | | | | Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 7 04:53:39 CEST 2015 on sn-devel-104
* net: Fix sam addgroupmemVolker Lendecke2015-01-131-3/+5
| | | | | | | | | | | | | Domain local groups come across as SID_TYPE_ALIAS and are sent to us in the PAC/Info3 struct. We should allow this in net sam addgroupmem. Volker Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jan 13 15:28:16 CET 2015 on sn-devel-104
* idmap: unify passdb *id_to_sid methodsGarming Sam2014-12-031-1/+5
| | | | | | | | | | | | | | | Instead of passing down gid or uid, a pointer to a unixid is now sent down. This acts as an in-out variable so that the idmap functions can correctly receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066 Pair-programmed-with: Andrew Bartlett <abarlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* param: rename lp function and variable from 'guestaccount' to 'guest_account'Garming Sam2014-02-071-5/+5
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-lib: Add grpname to talloc_sub_specified().Andreas Schneider2013-11-211-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:utils/net_sam make use of pdb_create_builtin helper functionChristian Ambach2013-06-211-1/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-smbldap: use smbldap_ prefixed functionsAlexander Bokovoy2012-09-071-5/+5
|
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-5/+10
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.Günther Deschner2011-11-161-1/+16
| | | | Guenther
* s3-net: use better state variable name for smbldap_state.Günther Deschner2011-11-161-9/+9
| | | | Guenther
* s3-passdb: split out passdb/pdb_ldap_schema.cGünther Deschner2011-11-161-0/+1
| | | | Guenther
* s3: move smbldap_util to pdb_ldap_util.Günther Deschner2011-11-161-0/+1
| | | | Guenther
* s3-group-mapping: Remove fstrings from GROUP_MAP.Simo Sorce2011-10-121-53/+58
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
* s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.Amitay Isaacs2011-08-191-6/+7
| | | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-net: add IPA provisionSumit Bose2011-04-061-20/+119
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3: only include lib/privileges.h where needed.Günther Deschner2011-03-301-0/+1
| | | | | | This finally removes the global lsa.h inclusion. Guenther
* s3-passdb: add passdb.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/passwd.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-winbind: remove global inclusion of libwbclient.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3:net Find uid before using itSumit Bose2011-03-171-7/+7
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* Make getpwnam_alloc() static to lib/username.c, and ensure all username ↵Jeremy Allison2010-10-201-2/+2
| | | | | | | | | | | | lookups go through Get_Pwnam_alloc(), which is the correct wrapper function. We were using it *some* of the time anyway, so this just makes us properly consistent. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Oct 20 16:02:12 UTC 2010 on sn-devel-104
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3: Remove talloc_autofree_context() from net_sam_provision()Volker Lendecke2010-09-261-1/+1
|
* s3-build: only include smbldap.h where needed.Günther Deschner2010-09-201-0/+1
| | | | Guenther
* s3-privs Hide the bitmap-based grant_privilege and revoke_privilegeAndrew Bartlett2010-09-111-7/+6
| | | | | | | | | The new wrappers avoid anything but the core privileges code dealing with the bitmap values directly. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Make privilege_enum_sids() take an LUID, not a bitmapAndrew Bartlett2010-09-111-3/+5
| | | | | | | | This moves one more privileges call away from direct bitmap manipuation. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Remove a pointer from grant_privilege()Andrew Bartlett2010-09-111-1/+1
| | | | | | Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Remove a pointer indirection from revoke_privilege()Andrew Bartlett2010-09-111-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Don't export privs[] as a global variableAndrew Bartlett2010-09-111-4/+2
| | | | | | | | | | | | Instead, provide access functions for the LSA and net sam callers for the information they need. They still only enumerate the first 8 privileges that have traditionally been exposed. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Further changes to remove SE_PRIVAndrew Bartlett2010-09-111-3/+3
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:net sam provision: compose sid before getting uid for GuestMichael Adam2010-08-141-2/+2
| | | | Michael
* s3:net sam provision: allocate the uid after composing the sid for AdministratorMichael Adam2010-08-141-6/+7
| | | | Michael
* s3-passdb: include samr.h where needed.Günther Deschner2010-08-061-0/+1
| | | | Guenther
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-211-19/+19
| | | | | | | | | | This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s3-rpc_misc: clean out include/rpc_misc.h.Günther Deschner2010-05-181-5/+5
| | | | | | | Well known rids don't really belong into an rpc header, just use the ones defined in security.idl. Guenther
* s3: Slightly simplify unmap_unix_groupVolker Lendecke2010-03-281-4/+1
|
* s3 net: Fix compile warningsKai Blin2010-01-191-36/+68
|
* s3 net/i18n: Use only one spelling for "Usage:"Kai Blin2010-01-191-21/+21
|
* s3/net: split up some printable stings to ease i18nBjörn Jacke2010-01-181-26/+26
| | | | | | If we put strings like "Usage:" into separate _() macros and not the whole "Usage:..." string we can cover much more messages by only one single translation. The drawback is that the message in the sources looks less pretty.
* s3-net: acct_flags are uint32_t in net_sam_set_userflag().Günther Deschner2009-10-281-1/+1
| | | | Guenther
* s3 net: i18n support for net samKai Blin2009-08-111-318/+349
|
* s3: fix build of pdbedit and net_sam. Guenther, please check. Signed-off-by: ↵Bo Yang2009-07-151-4/+4
| | | | Bo Yang <boyang@samba.org>
* Turn the pdb_rid_algorithm into a capabilities call that returns flagsVolker Lendecke2009-06-281-3/+3
|
* s3-net: Fix Bug #6328: support "net sam rights grant/revoke" with multiple ↵David Markey2009-06-171-18/+24
| | | | | | | | rights. David Signed-off-by: Günther Deschner <gd@samba.org>
* s3-net: Fix Bug #6328: allow multiple rights in "net sam rights grant".Günther Deschner2009-06-171-10/+14
| | | | Guenther