1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

448 Commits

Author SHA1 Message Date
Michael Adam
6ab11e5f98 Rename libnet_smbconf_format_registry_value() to libnet_conf_format_registry_value().
Michael
(This used to be commit 3f9f353351)
2008-01-03 14:17:49 +01:00
Michael Adam
547c3583e4 Rename libnet_smbconf_reg_set_value() to libnet_conf_reg_set_value().
Michael
(This used to be commit 96b2923bc3)
2008-01-03 14:17:48 +01:00
Michael Adam
340cb434db Rename libnet_smbconf_reg_create_service_key() to libnet_conf_reg_create_service_key().
Michael
(This used to be commit cd1846943c)
2008-01-03 14:17:48 +01:00
Michael Adam
d3e54d913c Rename libnet_smbconf_value_exists() to libnet_conf_value_exists().
Michael
(This used to be commit 49f740797b)
2008-01-03 14:17:48 +01:00
Michael Adam
cd84256866 Rename libnet_smbconf_reg_open_basekey() to libnet_conf_reg_open_base_key().
Michael
(This used to be commit c2ba52b2c3)
2008-01-03 14:17:48 +01:00
Michael Adam
dde8701b85 Rename libnet_smbconf_reg_open_service_key() to libnet_conf_reg_open_service_key().
Michael
(This used to be commit 4d86d2dd6f)
2008-01-03 14:17:48 +01:00
Michael Adam
e598b93d2f Rename libnet_smbconf_reg_open_path() to libnet_conf_reg_open_path().
Michael
(This used to be commit 9868364e2c)
2008-01-03 14:17:48 +01:00
Michael Adam
4612391850 Rename libnet_smbconf_add_string_to_array() to libnet_conf_add_string_to_array().
This is the start of making nomenclature more consistent
(functions in libnet_conf.c should be called libnet_conf_*,
not libnet_smbconf_* ...

Michael
(This used to be commit 0dd3967bfd)
2008-01-03 14:17:48 +01:00
Günther Deschner
b0994bead7 In libnetjoin don't mix admin password with machine account pwd.
Guenther
(This used to be commit 5b2eec21c2)
2008-01-03 13:17:49 +01:00
Michael Adam
984aa7a156 Rename libnet_smbconf_reg_setvalue_internal() to libnet_smbconf_reg_set_value().
Michael
(This used to be commit 3fc3fee88a)
2008-01-03 11:35:21 +01:00
Michael Adam
e0ea759807 Fix a comment.
Michael
(This used to be commit 2d0c7fe44f)
2008-01-03 11:33:17 +01:00
Michael Adam
a750e223b3 Rename libnet_smbconf_reg_createkey_internal to libnet_smbconf_reg_create_service_key.
Michael
(This used to be commit 08056a2c81)
2008-01-03 11:32:00 +01:00
Michael Adam
fd597c7e6d Add libnet_conf API function libnet_smbconf_create_share().
And make libnet_smbconf_setparm() return error if the share
does not already exist. Adapt net_conf_addshare to this new
situation.

Michael
(This used to be commit de349bd26d)
2008-01-03 11:30:14 +01:00
Günther Deschner
40079c4eb4 Remove unused vars.
Guenther
(This used to be commit ff3f0006d1)
2008-01-03 10:49:39 +01:00
Michael Adam
ad1cc905b2 Don't leak: Use a temporary context for the admin token and free it.
Michael
(This used to be commit 9d7502115e)
2008-01-03 01:29:43 +01:00
Michael Adam
3c9f7c7a64 Use libnet_smbconf_reg_open_path() in libnet_smbconf_drop().
Replaces creation of token and direct use of reg_open_path.

Michael
(This used to be commit 7e407e18be)
2008-01-03 01:29:43 +01:00
Michael Adam
3bf57a4d82 Abstract opening of registry path out of libnet_smbconf_reg_open_service_key().
Creates new function libnet_smbconf_reg_open_path().
Use libnet_smbconf_reg_open_path() directly in libnet_smbconf_reg_open_basekey().
Return error in libnet_smbconf_reg_open_service_key() when NULL
servicename is given.

Michael
(This used to be commit 1e46b47963)
2008-01-03 01:29:43 +01:00
Michael Adam
f9bb8a345e Add debug output in error path.
Michael
(This used to be commit a58ccbc6d7)
2008-01-03 01:29:43 +01:00
Michael Adam
b344dafa62 Fix setting of error code in error path.
Michael
(This used to be commit 8a7954a9ae)
2008-01-03 01:29:43 +01:00
Michael Adam
a6fb71e55b Use a better parameter name.
Michael
(This used to be commit 3972deb90c)
2008-01-03 01:29:43 +01:00
Michael Adam
c995a63371 Rename libnet_smbconf_reg_open_path() to libnet_smbconf_reg_open_service_key().
Michael
(This used to be commit d95b4935d3)
2008-01-03 01:29:43 +01:00
Michael Adam
d191bb126b Hey, it is 2008 now.
:-)

Michael
(This used to be commit a1d3f60ea7)
2008-01-03 01:29:43 +01:00
Michael Adam
102fda5c29 Choose a more apropriate parameter name.
Michael
(This used to be commit 39a73b6291)
2008-01-03 01:29:43 +01:00
Michael Adam
83d74c10a2 Rename libnet_smbconf_reg_open_basepath() to libnet_smbconf_reg_open_basekey().
Michael
(This used to be commit 9e953a94e9)
2008-01-03 01:29:43 +01:00
Michael Adam
8598bbbcb1 Make the last two helper functions in libnet_conf.c static.
Now the registry backend is completely hidden from the API.

Michael
(This used to be commit 5608c398ad)
2007-12-31 03:57:45 +01:00
Michael Adam
e8a680cdf3 Rename libnet_smbconf_key_exists() to libnet_smbconf_share_exists()
and move it to the api section of libnet_conf.c

Michael
(This used to be commit 9b5d8f4d95)
2007-12-31 01:14:44 +01:00
Michael Adam
0f2e7c7381 Remove an unused variable.
Michael
(This used to be commit 7bac935b65)
2007-12-30 22:36:01 +01:00
Michael Adam
80957726b6 Remove all d_fprintf-s from libnet_conf.c
Replacing them buy DEBUG statements and filling in
d_fprintfs in callers in net_conf.c.

Michael
(This used to be commit 1f0122d8d4)
2007-12-30 22:36:01 +01:00
Michael Adam
d674b95357 Make libnet_smbconf_reg_open_path() static.
Michael
(This used to be commit 6447bae71c)
2007-12-30 00:32:42 +01:00
Michael Adam
1f992517ec Make libnet_smbconf_reg_open_basepath() static.
Michael
(This used to be commit 8e87dd79ba)
2007-12-30 00:32:42 +01:00
Michael Adam
59128c7837 Remove list_values() from net_conf.c - it is not needed any more.
Also make libnet.c:libnet_smbconf_format_registry_value() static.
(There are nor more external callers.)

Michael
(This used to be commit ac7baa17e8)
2007-12-30 00:32:41 +01:00
Michael Adam
fe47e2e855 Add a function libnet_smbconf_get_config() to libnet_conf.c
This gets the whole config as a set of lists (of share names
and corresponding lists of parameter names and values). The function
is an aggregate of libnet_smbconf_get_share_names() and
libnet_smbconf_getshare().

Michael
(This used to be commit 94e97a7254)
2007-12-30 00:32:41 +01:00
Michael Adam
df93c1aa57 Include libnet/libnet.h in libnet_conf.c to have prototypes available.
Michael
(This used to be commit 4842438c39)
2007-12-30 00:32:41 +01:00
Michael Adam
397b4d5397 Return NULL (instead of unchanged) for no shares/parameters defined.
Michael
(This used to be commit bfe3d1462f)
2007-12-29 17:06:49 +01:00
Michael Adam
a6d6fbb73d Dont return count - 1 but count from libnet_smbconf_reg_get_values().
Michael
(This used to be commit ded60dec7d)
2007-12-29 17:02:27 +01:00
Michael Adam
e8cb7cecf2 Make sure libnet_smbconf_get_share_names() always lists "global" first.
And don't return count-1 but count.

Michael
(This used to be commit b7cb9b7823)
2007-12-29 17:00:27 +01:00
Michael Adam
0e8ca78720 Move talloc-appending a string to an array to its own helper function
libnet_smbconf_add_string_to_array().

Michael
(This used to be commit f4a4c1b26a)
2007-12-29 16:45:01 +01:00
Volker Lendecke
d38aa8d037 Fix uninitalized variables
(This used to be commit 2322fe7187)
2007-12-29 16:41:31 +01:00
Michael Adam
1c03f6b608 Rename libnet_smbconf_getshares() to libnet_smbconf_get_share_names().
Michael
(This used to be commit 9b3b9aa7e1)
2007-12-29 12:55:42 +01:00
Michael Adam
cf90b67d59 Add a comment header for libnet_smbconf_getshares().
Michael
(This used to be commit 7b51535f2f)
2007-12-29 12:53:19 +01:00
Michael Adam
2a642a6e2b Move functionality of net_conf_listshares() to libnet_conf.c
into new function libnet_smbconf_getshares().

Michael
(This used to be commit 306c7e4d9c)
2007-12-29 12:52:09 +01:00
Michael Adam
f8c39cbb7b Move functionality of net_conf_showshare() to libnet_conf.c
The functionality is moved to a new function libnet_smbconf_getshare().
This returns the parameters of the given share as two lists: the list
of parameter names and the list of matching (formatted) parameter values.

The retrieval and formatting is done in a new internal helper function
libnet_smbconf_reg_get_values() that is to become the replacement for
list_values() from net_conf.c once functionality of net_conf_list() has
been moved to libnet_conf, too.

Michael
(This used to be commit 198232bd52)
2007-12-29 12:32:16 +01:00
Michael Adam
27f0130434 Add a couple of comment headers to the main libnet_conf functions.
Michael
(This used to be commit e9694ae20e)
2007-12-29 02:26:33 +01:00
Michael Adam
b5b51b530f Add a comment header for libnet_smbconf_format_registry_value().
Michael
(This used to be commit 80e73407ea)
2007-12-29 02:18:44 +01:00
Michael Adam
618b0efbbc Handle NULL talloc context in libnet_smbconf_format_registry_value().
Maybe we should generate a new context instead of returning NULL?

Michael
(This used to be commit d7aaec713e)
2007-12-29 02:16:38 +01:00
Michael Adam
eb356fbafc Hide the registry backend from libnet_smbconf_getparm().
Return a formatted string of the value instead.

Michael
(This used to be commit 7d0ec5bae1)
2007-12-29 02:12:33 +01:00
Michael Adam
4b75bc63bb Rename format_value() to libnet_smbconf_format_registry_value().
Michael
(This used to be commit 95d5dd9bb0)
2007-12-29 01:17:39 +01:00
Michael Adam
dfa8d9356c Move format_value() to libnet_conf.c.
Michael
(This used to be commit 3422a5048a)
2007-12-29 00:05:58 +01:00
Michael Adam
f99af84e6a Move libnet_smbconf_reg_open_basepath() in source file
to group helper functions more logically.

Michael
(This used to be commit 3fa3891f87)
2007-12-26 01:03:28 +01:00
Michael Adam
afca308742 Rename libnet_smbconf_open_basepath() to libnet_smbconf_reg_open_basepath().
Michael
(This used to be commit 4c0e7270c4)
2007-12-26 01:01:14 +01:00
Michael Adam
18ea20e19b Rename libnet_smbconf_open_path() to libnet_smbconf_reg_open_path().
Michael
(This used to be commit 4b0e636965)
2007-12-26 00:58:11 +01:00
Michael Adam
e8cfbb0f4c Rename libnet_smbconf_open_path_q() to libnet_smbconf_open_path()
removing previouse libnet_smbconf_open_path() and adding
DEBUG output (instead of d_fprintf error output) to new
libnet_smbconf_open_path().

Michael
(This used to be commit e63cc54fab)
2007-12-26 00:53:19 +01:00
Michael Adam
a107e8421d Remove now unneeded talloc ctx parameter from do_JoinConfig().
Michael
(This used to be commit be985d8d0c)
2007-12-25 03:41:34 +01:00
Michael Adam
8445e820f2 Remove now unneeded talloc ctx parameter from do_join_modify_vals_config().
Michael
(This used to be commit f8823ae123)
2007-12-25 03:40:35 +01:00
Michael Adam
d25661a615 Remove now unneeded talloc ctx parameter from do_UnjoinConfig().
Michael
(This used to be commit 92b8e5ea4b)
2007-12-25 03:39:31 +01:00
Michael Adam
fc8be9d710 Remove now unneeded talloc ctx parameter from do_unjoin_modify_vals_config().
Michael
(This used to be commit 4f7375a110)
2007-12-25 03:38:06 +01:00
Michael Adam
44631bfd4d Remove talloc context parameter from libnet_smbconf_delparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_delparm.

Michael
(This used to be commit 16f1373938)
2007-12-25 03:34:04 +01:00
Michael Adam
f3b0469b4a Remove talloc context parameter from libnet_smbconf_setparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_setparm.

Michael
(This used to be commit efaffefc43)
2007-12-25 03:29:05 +01:00
Michael Adam
a66a5fd94b Typofix in comment.
Michael
(This used to be commit 5039a70246)
2007-12-25 03:16:25 +01:00
Michael Adam
dff8e6b62c Add comment header to function libnet_smbconf_drop().
Michael
(This used to be commit e94edb6bdb)
2007-12-25 03:08:00 +01:00
Michael Adam
efd218fb07 Remove a d_fprintf() from libnet_smbconf_drop().
Michael
(This used to be commit 078e5e98b3)
2007-12-25 03:06:48 +01:00
Michael Adam
e5a87c2543 Remove talloc context parameter from libnet_smbconf_drop().
Make use of talloc_stackframe.

Michael
(This used to be commit aaceab1153)
2007-12-25 03:05:06 +01:00
Michael Adam
2764f5a0a6 Rename drop_smbconf_internal() to libnet_smbconf_drop().
Michael
(This used to be commit 5873e6a1f8)
2007-12-25 03:01:59 +01:00
Michael Adam
8e53343a74 Move drop_smbconf_internal() to libnet_conf.c
Michael
(This used to be commit 4c2a3396bb)
2007-12-25 02:55:07 +01:00
Michael Adam
86486fcc98 Simplify libnet_smbconf_delshare().
Remove talloc context parameter.
Remove d_printf error message.

Michael
(This used to be commit 870d35c048)
2007-12-25 02:37:02 +01:00
Michael Adam
9c20b9a731 Rename reg_delkey_internal() to libnet_smbconf_delshare().
Michael
(This used to be commit 7d501f0d78)
2007-12-25 02:24:39 +01:00
Michael Adam
c9f65929b7 Move reg_delkey_internal() to libnet/libnet_conf.c
Michael
(This used to be commit c1b863fd05)
2007-12-25 02:21:30 +01:00
Michael Adam
3177cece65 Do not leak memory in libnet_smbconf_delparm().
Michael
(This used to be commit 49cfe2b9eb)
2007-12-24 01:03:14 +01:00
Michael Adam
713221e1c5 Do not leak memory in libnet_smbconf_setparm().
Michael
(This used to be commit a657b1c9f1)
2007-12-24 01:00:46 +01:00
Michael Adam
92b1ef15df Use the appropriate boolean constants.
Michael
(This used to be commit 45e3e2451a)
2007-12-24 00:57:04 +01:00
Michael Adam
434f0bcb02 Make libnet_smbconf_value_exists() use talloc_stackframe().
And not pass a talloc context.

Michael
(This used to be commit 2983aba9d0)
2007-12-24 00:56:24 +01:00
Michael Adam
c74579f491 Make libnet_smbconf_key_exists() use talloc_stackframe().
And not pass a talloc context.

Michael
(This used to be commit 7e8451f2f0)
2007-12-24 00:53:22 +01:00
Michael Adam
225dbe6c02 Don't leak memory in libnet_smbconf_getparm().
Michael
(This used to be commit 09e62c7654)
2007-12-24 00:47:43 +01:00
Michael Adam
44860bce54 Fix rights error in libnet_smbconf_delparm().
Introduced by additional test for existence of given parameter.

Michael
(This used to be commit 0fe095e85c)
2007-12-24 00:18:35 +01:00
Michael Adam
6306005f4c Remove redundant check of return value.
Michael
(This used to be commit 29f46c2d45)
2007-12-24 00:18:35 +01:00
Michael Adam
8f163d5c5a Move logic of net_conf_getparm() to libnet_conf.c.
Michael
(This used to be commit d3a20c4d5a)
2007-12-24 00:18:35 +01:00
Michael Adam
d1c2280cd4 Rename libnet_reg_createkey_internal() to libnet_smbconf_reg_createkey_internal().
Michael
(This used to be commit 0e7f215f54)
2007-12-23 04:10:32 +01:00
Michael Adam
a48f3c8a96 Make libnet_smbconf_set_global_param() call libnet_smbconf_setparm().
This not only removes duplicate logic, but also the use of
libnet_smbconf_reg_setvalue_internal() instead of do_modify_val_config()
which is removed, does add important tests and canonicalizations.

Michael
(This used to be commit fa84486649)
2007-12-23 04:10:32 +01:00
Michael Adam
b6527f3d29 Reorder libnet_conf.c some, adding "section" comments.
Michael
(This used to be commit b9f22adfd3)
2007-12-23 04:10:32 +01:00
Michael Adam
62f08d3dd9 Move net_conf_setparm() to libnet_conf.c
renaming it to libnet_smbconf_setparm()

Michael
(This used to be commit 60f49b22b5)
2007-12-23 04:10:32 +01:00
Michael Adam
31d436e54c Move reg_setvalue_internal() to libnet_conf.c
renaming it to libnet_smbconf_setvalue_internal()

Michael
(This used to be commit 7cb51a1d6d)
2007-12-23 04:10:31 +01:00
Michael Adam
88a424a4d3 Remove occurrences of registry_key from libnet_join.c
Replace duplicated logic by calls of libnet_smbconf_set_global_param()
from libnet_conf.c, pushing logic from do_JoinConfig() and do_UnjoinConfig()
to do_join_modify_vals_config() and do_unjoin_modify_vals_config()
respectively.

Only the net_conf api functions should be exported by libnet_conf.c, not
the lower level registry access functions.

Michael
(This used to be commit 81b9f1301d)
2007-12-23 04:10:31 +01:00
Michael Adam
bd2b8f0f7b Replace direct deletion of registry value by use of libnet_smbconf_delparm().
Michael
(This used to be commit 415fc0a526)
2007-12-23 04:10:31 +01:00
Michael Adam
b04708866f Move logic of net_smbconf_delparm() to libnet/libnet_conf.c
Logic in new function libnet_smbconf_delparm().

Michael
(This used to be commit 0cff79e355)
2007-12-23 04:10:31 +01:00
Michael Adam
ec3e8587ec Move smbconf_value_exists() to libnet/net_conf.c
renaming it to libnet_smbconf_value_exists().

Michael
(This used to be commit ba71c68445)
2007-12-23 04:10:31 +01:00
Michael Adam
aeea4bfadd Make libnet_smbconf_open_path_q() static.
Michael
(This used to be commit 8cf8ed9de8)
2007-12-23 04:10:31 +01:00
Günther Deschner
30a788bd20 Fix uninitialized error code in do_unjoin_modify_vals_config().
Guenther
(This used to be commit c890ebc3ca)
2007-12-22 00:13:24 +01:00
Günther Deschner
3f5d5bc300 Until we better understand the WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT make sure we are
not joining as a DC.

Guenther
(This used to be commit bf3ffbb5d2)
2007-12-21 23:05:10 +01:00
Günther Deschner
3537af86c4 Fix typo.
Guenther
(This used to be commit b95801db59)
2007-12-21 15:29:11 +01:00
Günther Deschner
991112eda7 Implement NetServerSetInfo level 1005 in local mode with smbconf registry.
Guenther
(This used to be commit 15c2bc15f2)
2007-12-21 15:29:11 +01:00
Günther Deschner
41467ffc6d Add libnet_Unjoin(), libnet_UnjoinCtx and friends.
Guenther
(This used to be commit 89e8abb116)
2007-12-21 15:29:11 +01:00
Günther Deschner
f3476faa36 In libnet join code, try lsa query with level 12 first.
Guenther
(This used to be commit f0e8d744c9)
2007-12-21 15:29:10 +01:00
Günther Deschner
b6347c0693 Making do_DomainJoin return NTSTATUS again.
Guenther
(This used to be commit 91b8849898)
2007-12-21 15:29:10 +01:00
Günther Deschner
c5a84374b6 Make sure we also support non-domain join.
Guenther
(This used to be commit c818f5505a)
2007-12-21 15:29:10 +01:00
Günther Deschner
41410c86cc Some libnet and netapi build fixes.
Guenther
(This used to be commit 1d47247283)
2007-12-21 15:29:10 +01:00
Günther Deschner
5bf7319ac4 Add libnet_Join().
Heavily based on existing code in net_ads_join().

Guenther
(This used to be commit fb6315b68b)
2007-12-21 15:29:10 +01:00
Günther Deschner
913d220e0b Add libnet_JoinCtx structure.
Guenther
(This used to be commit 13c46b1407)
2007-12-21 15:29:09 +01:00
Günther Deschner
1b5c1ae742 Very quick conversion of net_conf functions into the libnet_conf layer.
Certainly needs cleanup later.

Guenther
(This used to be commit 2b41ac926d)
2007-12-21 15:29:09 +01:00