1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

85 Commits

Author SHA1 Message Date
Stefan Metzmacher
17e496c6f9 s3:g_lock: add callback function to g_lock_lock()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-09-20 00:34:35 +00:00
Volker Lendecke
f41c7ea8a2 registry3: Move registry_value_cmp() to its only user
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-09-19 17:23:31 +00:00
Ralph Boehme
2327471756 lib: relicense smb_strtoul(l) under LGPLv3
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
2020-08-03 22:21:02 +00:00
Volker Lendecke
d9bd074cc8 net: Avoid the use of g_lock_do()
g_lock_do() does too much in g_lock.c, and it's rarely used.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-06 20:36:34 +00:00
Swen Schillig
a75727f191 source3: Update all consumers of strtoul_err(), strtoull_err() to new API
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
2019-06-30 11:32:18 +00:00
Swen Schillig
e82228f2e0 utils: Use wrapper for string to integer conversion
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>
2019-03-01 00:32:10 +00:00
Volker Lendecke
c2ea100777 lib: Pass mem_ctx to state_path()
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-08-17 11:30:11 +02:00
Volker Lendecke
a6c749e76c lib: Make g_lock_do use TDB_DATA
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-08 10:01:50 +01:00
Günther Deschner
a15159f5a5 werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source3/utils/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:23 +02:00
Günther Deschner
9c164efe2a werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/utils/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:19 +02:00
Günther Deschner
f7b172fd42 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/utils/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Richard Sharpe
57941aa044 s3: utils: Convert all uses of uint32/16/8 to _t.
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
2015-05-07 04:53:39 +02:00
Volker Lendecke
38628b1e32 Fix the O3 developer build
Different gcc versions complain at different places

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar  3 13:14:53 CET 2015 on sn-devel-104
2015-03-03 13:14:53 +01:00
David Disseldorp
c3f3b13beb net_registry: don't leak state_path onto talloc tos
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
Michael Adam
ac4899eaa1 s3:net registry import: implement dry-run with "--test"
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 26 21:43:49 CEST 2012 on sn-devel-104
2012-06-26 21:43:49 +02:00
Michael Adam
3705119bb0 s3:net registry import: add an assert
Pair-Programmed-With: Gergor Beck <gbeck@sernet.de>
2012-06-26 19:57:19 +02:00
Michael Adam
8bf08505c1 s3:net registry import: reduce indentation
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-26 19:57:19 +02:00
Michael Adam
d5ab3282e4 s3:net registry import: fix the return code when transaction commit fails
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-26 19:57:19 +02:00
Michael Adam
a3ed47a09b s3:net registry import: improve regdb_open/close layering
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-26 19:57:19 +02:00
Michael Adam
c55a6dae65 s3:net registry import: untangle nested function calls 2012-06-26 19:57:19 +02:00
Michael Adam
20e5e8ef26 s3:net registry import: reduce indentation and untangle assignment from check
in import_with_precheck_action().
2012-06-26 19:57:19 +02:00
Michael Adam
f9ff84b0b4 s3:net registry import: move precheck-and-import code to its own function
This is the code that is executed in a registry transaction.
The purpose of the refactoring is to be able to simplify and
untangle the code structure in the sequel.
2012-06-26 19:57:19 +02:00
Gregor Beck
e28b4b10a6 s3:net registry: fix violation of coding conventions
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:19 +02:00
Gregor Beck
0fb847b738 s3:net registry import: add option --precheck
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:19 +02:00
Gregor Beck
69add7e4fd s3:net registry import: check return values + codecleanup
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Michael Adam
dc4cf82fb5 s3:net registry: fix a copy and paste error in a help text 2012-01-31 17:00:30 +01:00
Volker Lendecke
0f9d14820e s3: Remove a bunch of calls to procid_self()
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Michael Adam
b15d3251ac s3:net registry: fix segfault when net registry is called without subcommands...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 14 17:51:53 CEST 2011 on sn-devel-104
2011-10-14 17:51:53 +02:00
Gregor Beck
491afa3a4c s3:net: avoid unnecessary initialization of the registry.
This allows for using help without having access to the registry and
prevents update code to run if only a readonly check is to be performed.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
502f0b8edc s3:net: add command registry check
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Stefan Metzmacher
5d736d8777 s3:utils/net_*registry: use c99 initializers which are supported by old gcc 2.95 compilers (bug #8226)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jun 15 03:48:41 CEST 2011 on sn-devel-104
2011-06-15 03:48:41 +02:00
Gregor Beck
723ba6024c s3:net: registry export: close key after recursion returns
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon May 30 18:53:28 CEST 2011 on sn-devel-104
2011-05-30 18:53:28 +02:00
Michael Adam
0d746f653e s3:net registry: polish output of net registry enumerate[_recursive]
so that net registry enumerate output is as before, and
net registry enumerate_recursive is formatted more nicely
2011-05-30 17:42:27 +02:00
Gregor Beck
5ec479fa0c s3:net: registry: use recursive implementation for enumerate
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Gregor Beck
22011ddc9e s3:net: registry: add new command enumerate_recursive
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0a250f4946 registry: create and use shared libcli/registry/util_reg.h header.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
49ccae1c20 s3-includes: no point in including all security headers globally.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
e1f84330ba libcli/security: move display_sec headers to own header file and add to
security.h grouping header.

Guenther
2011-03-16 10:11:08 +01:00
Michael Adam
e57d4c41d7 s3:net registry: ignore WERR_BADFILE when --force is given in deletekey[_recursive]
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Jan 30 14:53:13 CET 2011 on sn-devel-104
2011-01-30 14:53:13 +01:00
Michael Adam
e81ddbcade s3:net registry: fix a debug message. 2011-01-30 14:09:04 +01:00
Michael Adam
3649798bee s3:net registry: fix a debug message. 2011-01-30 14:09:04 +01:00
Volker Lendecke
0e95fca747 s3: Add "net registry getvaluesraw"
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  2 15:42:22 UTC 2010 on sn-devel-104
2010-11-02 15:42:22 +00:00
Michael Adam
cb5c86e502 s3:net: add subcommand net registry deletekey_recursive
to delete a key including subkeys
2010-09-22 06:30:01 +02:00
Michael Adam
7a25d13742 s3:registry: remove unneeded TALLOC_CTX argument from reg_deletekey_recursive 2010-09-22 06:30:01 +02:00
Gregor Beck
0afc83c255 s3-net: add command registry convert
Signed-off-by: Michael Adam <obnox@samba.org>
2010-09-22 06:30:00 +02:00
Gregor Beck
e7c2724c81 s3-net: add command registry export
Signed-off-by: Michael Adam <obnox@samba.org>
2010-09-22 06:30:00 +02:00
Gregor Beck
2a10fd769b s3-net: add command registry import
Signed-off-by: Michael Adam <obnox@samba.org>
2010-09-22 06:30:00 +02:00
Michael Adam
0bd2756b97 s3:registry: move prototypes from reg_init_basic.c to their own header. 2010-09-21 08:52:06 +02:00
Michael Adam
b11cc30508 s3:registry: move the reg_api prototypes to their own header. 2010-09-21 08:52:06 +02:00