summaryrefslogtreecommitdiff
path: root/source3/groupdb
AgeCommit message (Collapse)AuthorFilesLines
2023-08-08s3:groupdb: Add missing newline to logging messageJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-08-03lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme2-0/+2
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
2019-11-27smbdotconf: mark "set primary group script" with substitution="1"Ralph Boehme1-2/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27smbdotconf: mark "delete user from group script" with substitution="1"Ralph Boehme1-2/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27smbdotconf: mark "delete group script" with substitution="1"Ralph Boehme1-2/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27smbdotconf: mark "add user to group script" with substitution="1"Ralph Boehme1-2/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27smbdotconf: mark "add group script" with substitution="1"Ralph Boehme1-2/+4
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-09-26s3/groupdb: clang: 'Value stored during its initialization is never read'Noel Power1-1/+1
Fixes: source3/groupdb/mapping_tdb.c:460:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_OK; ^~~~~~ ~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26s3/groupdb: clang: Fix 'Value stored during its initialization is never read'Noel Power1-1/+1
Fixes: ource3/groupdb/mapping.c:648:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_OK; ^~~~~~ ~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-06-30source3: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig2-10/+16
Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
2019-03-01groupdb: Use wrapper for string to integer conversionSwen Schillig2-5/+18
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>
2018-12-20groupdb: Use dom_sid_str_bufVolker Lendecke2-2/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-11-09passdb: Use dom_sid_str_bufVolker Lendecke1-9/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-09passdb: Use dom_sid_str_bufVolker Lendecke1-7/+9
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-02passdb: Use dom_sid_str_bufVolker Lendecke1-8/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-08-17lib: Pass mem_ctx to state_path()Volker Lendecke1-3/+3
Fix a confusing API: Many places TALLOC_FREE the path where it's not clear you have to do it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-05-09Fix Jean François name to be UTF-8Simo Sorce2-2/+2
Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 9 10:38:57 CEST 2018 on sn-devel-144
2018-04-04groupdb: Fix CID 1167984 Ignoring number of bytes readVolker Lendecke1-1/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-02-22Correct "errror" typos.Chris Lamb1-1/+1
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-10-13Update smbrun to allow for settings environment variables.Trever L. Adams1-5/+5
Signed-off-by: Trever L. Adams <trever.adams@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 13 04:26:26 CEST 2016 on sn-devel-144
2015-05-14Convert all uses of uint32/16/8 to _t in source3/groupdb.Richard Sharpe2-7/+7
Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-30groupdb: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2015-03-17lib: Remove tdb_compatVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-11-10mapping_tdb: add missing talloc_free in error pathDavid Disseldorp1-0/+1
Reported-by: Michael Croes <mycroes@gmail.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-11-03groupdb: don't leak state_path onto talloc tosDavid Disseldorp1-3/+16
Also check for allocation failures. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07param: rename lp function and variable from "setprimarygroup_script" to ↵Garming Sam1-2/+2
"set_primary_group_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07param: rename lp function and variable from "deluserfromgroup_script" to ↵Garming Sam1-2/+2
"delete_user_from_group_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07param: rename lp function and variable from "delgroup_script" to ↵Garming Sam1-2/+2
"delete_group_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07param: rename lp function and variable from "addusertogroup_script" to ↵Garming Sam1-2/+2
"add_user_to_group_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07param: rename lp function and variable from "addgroup_script" to ↵Garming Sam1-2/+2
"add_group_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07dbwrap: add a dbwrap_flags argument to db_open()Michael Adam1-1/+1
This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-09group_mapping: Avoid a tallocVolker Lendecke1-7/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 9 20:41:15 CET 2014 on sn-devel-104
2013-06-21s3:passdb add a gid argument to pdb_create_builtin_aliasChristian Ambach1-12/+22
make it possible to skip the allocation of a new gid from winbind by specifying the gid to be used Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-10/+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>
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-1/+2
This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
2011-11-28s3: Fix a crash in group_mapping.ldb->tdb conversionVolker Lendecke1-0/+13
When we find a group_mapping.ldb entry without a comment, the upgrade code would have crashed with a NULL dereference Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Nov 28 12:24:08 CET 2011 on sn-devel-104
2011-10-14s3-passdb: move group mapping headers into passdb.hGünther Deschner1-98/+0
Guenther
2011-10-12s3-group-mapping: Remove fstrings from GROUP_MAP.Simo Sorce4-107/+276
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
2011-10-12s3-groupdb: split out groupdb/mapping_tdb.h.Günther Deschner4-4/+32
Guenther
2011-10-11s3:groupdb: convert mapping_tdb.c to use dbwrap wrapper functions onlyMichael Adam1-21/+31
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-4/+5
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-09-26s3-passdb: Cleanup use of fstring and move to talloc.Simo Sorce1-2/+8
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-09-26s3-group-mapping: Remove unused functions.Simo Sorce2-36/+0
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-0/+1
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-06-20tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell1-1/+1
TDB2 returns a negative error number on failure. This is compatible if we always check for < 0 instead of == -1. Also, there's no tdb_traverse_read in TDB2: we don't try to make traverse reliable any more, so there are no write locks anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell1-1/+1
We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-05-31s3:groupdb/proto.h: add _GROUPDB_PROTO_H_ guardMichael Adam1-0/+5
2011-05-31s3:groupdb/proto.h: add GPL/Copyright headerMichael Adam1-0/+22