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

45 Commits

Author SHA1 Message Date
Michael Adam
726f32b672 Add a missing free.
Michael
(This used to be commit bf6031287f)
2007-12-25 03:29:41 +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
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
9626fffe14 Use the proper boolean constants in net_conf.c
Michael
(This used to be commit 1fe4ea63b1)
2007-12-25 02:48:45 +01:00
Michael Adam
734ddacc91 Add error reporting to net_conf_delshare().
Michael
(This used to be commit 8d02a2de61)
2007-12-25 02:42:33 +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
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
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
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
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
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
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
Jeremy Allison
ade51769d5 We don't need P_GSTRING or P_UGSTRING anymore.
Jeremy.
(This used to be commit 78dc756000)
2007-12-07 12:43:10 -08:00
Volker Lendecke
78c6ee0090 Remove some globals
(This used to be commit 31d0a846db)
2007-12-05 14:39:07 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Michael Adam
c56874d112 r24527: Add a function lp_canonicalize_parameter_with_value that turns
a parameter and value into the canonical paramter with the value
inverted if it was in invers boolean synonym.

Make net conf use this function when storing parameters.

Michael
(This used to be commit 3b762ab183)
2007-10-10 12:29:54 -05:00
Michael Adam
8b0b1408a0 r24513: Reformatting: eliminate trailing spaces, overly long lines
and adjust some formattings to standard.

Michael
(This used to be commit 00432bcd69)
2007-10-10 12:29:53 -05:00
Michael Adam
53f5c4adfb r24496: Add initial synonym handling to "net conf":
When storing parameters in the smbconf portion of the registry,
up to now, synonyms could be misused to store a parameter twice.
Now this is prevented by canonicalizing the paramter name first.

Also, the value for a boolean parameter checked for validity
before storing the bool in registry.

(The canonicalization should finally go into the registry smbconf
code to also prevent e.g. "regedit" or "net rpc registry" from
storing synonyms. - This is in the making.)

Michael
(This used to be commit 95447dde86)
2007-10-10 12:29:52 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Michael Adam
d4f1b08c93 r23760: Untangle use of strrchr_m and strequal and add some checks
for the validity of the given registry key name.

Michael
(This used to be commit 4b4ba7724e)
2007-10-10 12:23:53 -05:00
Michael Adam
a5946cb46a r23750: Change the behaviour of net conf import when there is a global section
in the current registry and there is no global section in the input
file (or only global options with default values):
In that case the existing global section is now not touched. Before, it
would have been deleted and recreated empty. The new behaviour is how
other shares are treated too.

Note that since the input file is parsed by lp_load, there is currently
no way to distinguish between a section with only default parameters
and a non-existing section in net conf import.

Michael

PS: A couple of trailing white-spaces have been eliminated
and a line was broken to be not longer than 80 chars, too.
(This used to be commit ec21a0cf9f)
2007-10-10 12:23:52 -05:00
Michael Adam
1bea19c127 r23749: Simplify prototype of reg_setvalue_internal:
eliminate "type" parameter since we store only REG_SZ.

Michael
(This used to be commit 65ce463317)
2007-10-10 12:23:52 -05:00
Michael Adam
cba898808e r23748: Clean use of talloc in import_process_service:
create a temporary talloc ctx for the function.

Michael
(This used to be commit 39df7faaa9)
2007-10-10 12:23:51 -05:00
Michael Adam
c2c96bccda r23747: Move formatting of a parameter's value into a value string
to a function of its own. (for storing it in registry),
Eliminate the valtype variable : store everything as "sz".
Eliminate some trailing white spaces on the way.

Michael
(This used to be commit 76f4f224aa)
2007-10-10 12:23:51 -05:00
Michael Adam
feff1fcfd8 r23746: Fix missing assignments to target string of asprintf in import function.
Michael
(This used to be commit 6b1bf7c1f4)
2007-10-10 12:23:51 -05:00
Michael Adam
f7b8a3782a r23745: Fix: Check whether top subkeyname instead of whole registry key name
is equal to GLOBAL_NAME.

Michael
(This used to be commit fdcdcacf0a)
2007-10-10 12:23:51 -05:00
Michael Adam
ea78cb941a r23744: Remove TODO-comment. lp_load returns False if opening
of the config file fails. That's enough of checking for
existence and readbility to my taste.

Michael
(This used to be commit 204f4f1a94)
2007-10-10 12:23:51 -05:00
Michael Adam
f26abd78b1 r23666: Rename lp_parameter_valid -> lp_parameter_is_valid.
Michael
(This used to be commit 7f85cff49d)
2007-10-10 12:23:44 -05:00
Michael Adam
e388130aa6 r23657: Prevent setting of a global option in a share definition
in "net conf setparm".

Michael
(This used to be commit bf92d56798)
2007-10-10 12:23:42 -05:00
Michael Adam
2073303664 r23656: Add initial checking of the validity of a paramter
given to "net conf setparm". Add a utility function
lp_parameter_valid() for this to loadparm.c.

Michael
(This used to be commit 639051e58d)
2007-10-10 12:23:42 -05:00
Michael Adam
96c4bf4a1c r23655: Fix a comment and adjust some code formatting.
Michael
(This used to be commit b294bc707c)
2007-10-10 12:23:42 -05:00
Michael Adam
3163aff376 r23652: Use the recursive delete function instead of the original one
when deleting a share. Just to be sure...

Michael
(This used to be commit 91770e153d)
2007-10-10 12:23:41 -05:00
Michael Adam
cc4f37f928 r23585: Add a "drop" function to "net conf" that clears the
whole configuration stored in registry.

Michael
(This used to be commit 6d8973762e)
2007-10-10 12:23:32 -05:00
Michael Adam
3b9e5d0b4f r23549: Make "net conf setparm" always use registry data type "sz".
This simplifies the usage of this command from
"net conf setparm <section> <param> <type> <value>"
to
"net conf setparm <section> <param> <value>".

Micheal
(This used to be commit 41a8f8ec5f)
2007-10-10 12:23:27 -05:00
Michael Adam
ac1a7e2f96 r23543: Adjust comments.
(This used to be commit ec22c30581)
2007-10-10 12:23:27 -05:00
Michael Adam
6090601c8b r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
(This used to be commit efd3e2bfb7)
2007-10-10 12:23:21 -05:00
Volker Lendecke
a40df6f92d r22135: Check in most of Michael Adam's net conf utility. A good share of this patch
is moving functions around to fix some linker dependencies for the registry.

Michael, I've renamed your auth_utils2.c to token_utils.c.

Thanks!

Volker
(This used to be commit 9de16f25c1)
2007-10-10 12:19:16 -05:00