1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

190 Commits

Author SHA1 Message Date
Günther Deschner
b0994bead7 In libnetjoin don't mix admin password with machine account pwd.
Guenther
(This used to be commit 5b2eec21c27f07653e2dbb75c0f9ab4a60736773)
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 3fc3fee88afd9e8b6232afc140a07090b4215c23)
2008-01-03 11:35:21 +01:00
Michael Adam
e0ea759807 Fix a comment.
Michael
(This used to be commit 2d0c7fe44f075205db1713ef2d69006f7192c490)
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 08056a2c8160a44d27744467da467faea9ba0686)
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 de349bd26db3341815f6d8f6c18a5ca1fd664dca)
2008-01-03 11:30:14 +01:00
Günther Deschner
40079c4eb4 Remove unused vars.
Guenther
(This used to be commit ff3f0006d167a9bca85919bf6115d73413554909)
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 9d7502115e0f6cdfd27943d52f0de04447582b92)
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 7e407e18be0761e7004acfbd2376c3a435922c25)
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 1e46b479638c54e8bd7ba939bc7aba18a27b5155)
2008-01-03 01:29:43 +01:00
Michael Adam
f9bb8a345e Add debug output in error path.
Michael
(This used to be commit a58ccbc6d70613f7572bc80621935d81f9e290e3)
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 8a7954a9ae13df527ccedb1004ee4f87d506ce5b)
2008-01-03 01:29:43 +01:00
Michael Adam
a6fb71e55b Use a better parameter name.
Michael
(This used to be commit 3972deb90c4b645fb4d207a7e132cd7e180e78bb)
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 d95b4935d3a97ca9c4b7990bbcf4e85c81c79516)
2008-01-03 01:29:43 +01:00
Michael Adam
d191bb126b Hey, it is 2008 now.
:-)

Michael
(This used to be commit a1d3f60ea753a158447bb0208441453b76a0f3b9)
2008-01-03 01:29:43 +01:00
Michael Adam
102fda5c29 Choose a more apropriate parameter name.
Michael
(This used to be commit 39a73b6291fd028d44fc2712afa76abf1fcff9cb)
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 9e953a94e9b3a060769938ef6af25623e446c180)
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 5608c398ad9a0d05d651905a81dd92b7a0e120ff)
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 9b5d8f4d95ebfd47831906019e11227aecc83aa1)
2007-12-31 01:14:44 +01:00
Michael Adam
0f2e7c7381 Remove an unused variable.
Michael
(This used to be commit 7bac935b65565099c0dfb34cab0dec73dd5fb479)
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 1f0122d8d4ec0f67eaedd5df7383c1b45f37290f)
2007-12-30 22:36:01 +01:00
Michael Adam
d674b95357 Make libnet_smbconf_reg_open_path() static.
Michael
(This used to be commit 6447bae71c99407485307dd508603c73d5bb9823)
2007-12-30 00:32:42 +01:00
Michael Adam
1f992517ec Make libnet_smbconf_reg_open_basepath() static.
Michael
(This used to be commit 8e87dd79ba4e3aeceb26c7b4e131053172f077cd)
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 ac7baa17e89d2363b5b3db85de9c842b596dea25)
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 94e97a72548a7f76a5273346d472e3ba5b24795a)
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 4842438c396b93007fc4f4dded437567e562a2dc)
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 bfe3d1462f52d2849611fc58ad70fa08b4917077)
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 ded60dec7d75db7df485a159fb6bf628d8e24805)
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 b7cb9b78231512dc4a88c307048d7fb5334fa319)
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 f4a4c1b26a03cd0f334e00912d32f15c73474ff1)
2007-12-29 16:45:01 +01:00
Volker Lendecke
d38aa8d037 Fix uninitalized variables
(This used to be commit 2322fe718728178990fdc3696b84f5de7ae7701b)
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 9b3b9aa7e1044719a5112b9e5446e6fbdd7cecf9)
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 7b51535f2f76b5c3c18620ffd9ac64505357e6db)
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 306c7e4d9cecac4c2c0ea1172bd585c3c17d4541)
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 198232bd525cfac933b4885e6b330ebf4ac2c8ae)
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 e9694ae20e1da1d8c1cbb252e630815b561647dd)
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 80e73407ea326cc68cd8728845c7a1c0907e2201)
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 d7aaec713e17f93eed5177f0c3468deb625402a8)
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 7d0ec5bae155cda6620db04dcb7bd43db59241aa)
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 95d5dd9bb0546181cd499e6deabff562166412e3)
2007-12-29 01:17:39 +01:00
Michael Adam
dfa8d9356c Move format_value() to libnet_conf.c.
Michael
(This used to be commit 3422a5048ad4b7f789ec233356885d78dbdacf9a)
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 3fa3891f8721e9f02594cd1be2dc6b9b88692416)
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 4c0e7270c42788e7f77c402032ae74cf0f8a7106)
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 4b0e636965bd37e7c0deecb7b5eff0cc4487408b)
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 e63cc54fab8a0b03573f76305eab366a3ee4eda1)
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 be985d8d0ce80d12aa7f0b447b16b14aa0362826)
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 f8823ae1232022ed3f7f9be6b8959d413e8aed19)
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 92b8e5ea4ba26d663ea4e6fb65e4225d8259ea60)
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 4f7375a110a69530d6ef9781573f45a5bf8391a5)
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 16f137393881edc78c9322f038ba38e53e3ee07d)
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 efaffefc438f8375a083b194ac7a09e563000d3c)
2007-12-25 03:29:05 +01:00