1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-19 23:17:05 +03:00

118 Commits

Author SHA1 Message Date
Michael Adam
4b4ba7724e r23760: Untangle use of strrchr_m and strequal and add some checks
for the validity of the given registry key name.

Michael
2007-10-10 12:23:53 -05:00
Michael Adam
ec21a0cf9f 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.
2007-10-10 12:23:52 -05:00
Michael Adam
65ce463317 r23749: Simplify prototype of reg_setvalue_internal:
eliminate "type" parameter since we store only REG_SZ.

Michael
2007-10-10 12:23:52 -05:00
Michael Adam
39df7faaa9 r23748: Clean use of talloc in import_process_service:
create a temporary talloc ctx for the function.

Michael
2007-10-10 12:23:51 -05:00
Michael Adam
76f4f224aa 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
2007-10-10 12:23:51 -05:00
Michael Adam
6b1bf7c1f4 r23746: Fix missing assignments to target string of asprintf in import function.
Michael
2007-10-10 12:23:51 -05:00
Michael Adam
fdcdcacf0a r23745: Fix: Check whether top subkeyname instead of whole registry key name
is equal to GLOBAL_NAME.

Michael
2007-10-10 12:23:51 -05:00
Michael Adam
204f4f1a94 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
2007-10-10 12:23:51 -05:00
Michael Adam
7f85cff49d r23666: Rename lp_parameter_valid -> lp_parameter_is_valid.
Michael
2007-10-10 12:23:44 -05:00
Michael Adam
bf92d56798 r23657: Prevent setting of a global option in a share definition
in "net conf setparm".

Michael
2007-10-10 12:23:42 -05:00
Michael Adam
639051e58d 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
2007-10-10 12:23:42 -05:00
Michael Adam
b294bc707c r23655: Fix a comment and adjust some code formatting.
Michael
2007-10-10 12:23:42 -05:00
Michael Adam
91770e153d r23652: Use the recursive delete function instead of the original one
when deleting a share. Just to be sure...

Michael
2007-10-10 12:23:41 -05:00
Michael Adam
6d8973762e r23585: Add a "drop" function to "net conf" that clears the
whole configuration stored in registry.

Michael
2007-10-10 12:23:32 -05:00
Michael Adam
41a8f8ec5f 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
2007-10-10 12:23:27 -05:00
Michael Adam
ec22c30581 r23543: Adjust comments. 2007-10-10 12:23:27 -05:00
Michael Adam
efd3e2bfb7 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
2007-10-10 12:23:21 -05:00
Volker Lendecke
9de16f25c1 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
2007-10-10 12:19:16 -05:00