Garming Sam
72c6645760
s4-param: add error messages for failure to dump a parameter
...
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Garming Sam
931a370611
param: fix incorrect file error handling in s4 pyparam
...
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Garming Sam
e465634eec
s4-testparm: modify dumping of parameters to use the lib/param code to have more consistent output
...
In making this change, it also fixes a bug where attempting to dump a parameter would immediately cause an error
(due to a lack of string conversion).
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2014-01-28 17:26:36 +13:00
Jelmer Vernooij
bb4de6df6e
pyparam: fix formatting.
2012-02-26 23:19:07 +01:00
Amitay Isaacs
7f50890cd6
s4-param: Added bin_dir(),sbin_dir() methods to get compiled in dirs
2011-12-13 00:55:32 +11:00
Amitay Isaacs
42406d63a4
py-param: Add python interface to get server_role
2011-11-17 00:34:09 +01:00
Matthias Dieter Wallnöfer
5347074c4e
s4:param/pyparam.c - suppress "P_SEP" compilation warning
...
Reviewed-by: Jelmer
2011-09-20 18:43:06 +02:00
Jelmer Vernooij
88ecf1a9b8
Use public pytalloc header file.
...
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Aug 14 17:18:46 CEST 2011 on sn-devel-104
2011-08-14 17:18:46 +02:00
Jelmer Vernooij
f8ec7f6cb1
pytalloc: Use consistent prefix for functions, add ABI file.
2011-08-10 15:36:21 +02:00
Amitay Isaacs
921424fa38
s4-param: Fix object names for python objects PyLoadparm and PyLoadparmContext
...
Use the object names <modulename>.<objectname> to correctly generate
the object hierarchy in pydoc.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:52 +10:00
Andrew Bartlett
d9c3cb1fb6
s4-param Handle P_CHAR and P_BOOLREV in pyparam
...
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:09 +10:00
Andrew Bartlett
6b2749f8a9
param: Add hooks to s3 parm_struct and the parameters void * pointer
...
This is to that the pyparam hooks can use the hooks to connect with
the s3 loadparm system. This now also includes per-service
parameters.
Andrew Bartlett
2011-07-08 11:23:23 +02:00
Andrew Bartlett
7384a2b0b7
s4-param Merge struct parm_struct with version from source3/
2011-06-29 15:44:09 +10:00
Andrew Bartlett
f67a14976b
s4-param Remove 'modules dir'
...
The Samba waf build ensures that dyn_MODULESDIR is always correct
(even for in-tree binaries), so we don't need to allow the user to
configure this at run time.
Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
c091a92be5
s4-param Remove 'sam database' parameter
...
This now just relies on the private dir parameter, which remains.
Andrew Bartlett
2011-06-06 15:02:38 +10:00
Andrew Bartlett
67905b41a9
s4-param Rename private_path() -> lpcfg_private_path()
...
This is consistent with lock_path()
Andrew Bartlett
2011-04-29 16:38:14 +10:00
Matthias Dieter Wallnöfer
3940777a14
s4:python bindings - handle NULL returns from "loadparm_init_global"
...
Reviewed-by: Jelmer
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Mar 22 19:52:57 CET 2011 on sn-devel-104
2011-03-22 19:52:57 +01:00
Jelmer Vernooij
42eb3ab54d
source4/param: Fix prototypes for all functions.
2011-03-19 03:20:05 +01:00
Andrew Bartlett
d1e5a73806
s4-provision Remove setup_path, setup_dir and find_setup_dir
...
We now have a reliable way to know the current location of the
templates: dyn_SETUPDIR, which is updated for both the in-build and
installed binaries.
This replaces the function arguments and the distributed resolution of
the setup directory with one 'global' function (imported as required).
This also removes the ability to specify an alternate setup directory
on the command line, as this was rarely if ever used and never tested.
Andrew Bartlett
2011-02-07 13:22:01 +11:00
Andrew Bartlett
8dd3013208
s4-param Allow +foo syntax in smb.conf list parsing
...
The idea here is to allow an smb.conf file to work from the defaults,
rather than override them. For example, 'server services = +openchange'.
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Dec 8 09:39:06 CET 2010 on sn-devel-104
2010-12-08 09:39:06 +01:00
Jelmer Vernooij
a9fb47b5d6
pyparam: Use talloc.Object.
2010-12-01 01:48:25 +01:00
Andrew Tridgell
33d178767b
s4-loadparm: use loadparm_init_global() instead of loadparm_init()
...
this prevents us having two lp_ctx contexts in these tools which leads
to bizarre behaviour
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-29 18:04:42 +11:00
Arnaud Faucher
2ac5cedb71
Avoid the use of PyAPI_DATA, which is for internal Python API's.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104
2010-11-22 00:52:56 +01:00
Andrew Tridgell
6b266b85cf
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
...
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Jelmer Vernooij
7b32f65600
testparm: Check netbios name and workgroup characters and length.
2010-06-20 15:04:42 +02:00
Jelmer Vernooij
7a064b9960
pyparam: Support Loadparm.get(p, "global")
2010-06-20 14:14:01 +02:00
Jelmer Vernooij
338315f4d7
pyparam: Allow specifying None as section name to LoadparmContext.get()
...
to mean default section.
2010-06-20 13:51:14 +02:00
Jelmer Vernooij
de3f9e31d3
s4-python: Add LoadparmService.dump()
2010-06-20 13:40:49 +02:00
Jelmer Vernooij
74c66c9a3f
s4-python: Implement LoadParm.dump().
2010-06-20 13:29:35 +02:00
Andrew Tridgell
7ed349cace
pytalloc: allow for using a system libtalloc-dev with pytalloc
...
When we have a system talloc library, we still need to grab pytalloc.h
from lib/talloc. We don't want to just use -Ilib/talloc, as otherwise
we'll get the in-tree talloc.h which may not be compatible with the
system talloc.h
So we need to give the path to pytalloc.h
2010-03-29 21:34:29 +11:00
Matthias Dieter Wallnöfer
e34637b2a6
s4:Remove "Py_RETURN_NONE" compatibility code
...
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Jelmer Vernooij
c8e62797eb
Fix initialisation of TypeObject samba.param.LoadparmService.
...
Found by Ricardo Jorge <rvelhote@gmail.com>.
2009-12-21 23:40:11 +01:00
Andrew Tridgell
3050f83288
s4-python: we need to include Python.h first
...
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Ricardo Jorge
3641978dfa
param/pyparam: Cope with string list parameters being empty.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-08-04 00:18:43 +02:00
Ricardo Jorge
1174177c8f
python/loadparm: Get shares listing working.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-08-04 00:18:42 +02:00
Andrew Tridgell
269b16212a
use py_talloc_reference instead of py_talloc_import
...
This is one of the few cases where we want the object to be owned by
both the python object and C code
2009-07-01 15:15:37 +10:00
Jelmer Vernooij
28a2c262ac
param/python: Fix memory leak of LoadParm objects.
2009-06-17 20:45:38 +02:00
Jelmer Vernooij
308de544f4
python: Provide way to iterate over available shares.
2009-06-16 02:28:10 +02:00
Jelmer Vernooij
8d966fac41
Fix unresolved symbol in python messaging module.
2009-06-02 18:05:42 +02:00
Jelmer Vernooij
fe2b04b4bb
python: Move helper functions for using param into a separate file rather
...
than linking against the python module.
2009-06-02 18:05:40 +02:00
Stefan Metzmacher
ea546df573
s4:pyparam: fix compiler warnings
...
metze
2009-02-05 17:48:11 +01:00
Stefan Metzmacher
44625f76c1
s4:loadparm: s/class/pclass
...
metze
2009-02-02 13:09:10 +01:00
Jelmer Vernooij
673ca5145c
Find default smb.conf path correctly, when it was not specified on the
...
command-line.
2009-01-16 15:05:15 +01:00
Jelmer Vernooij
2d85e23e06
python/param: Cope with lp configfile being NULL.
2009-01-15 21:16:31 +01:00
Jelmer Vernooij
ba5d6e6d70
Avoid using a utility header for Python replacements included in Samba,
...
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea
s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4
2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1
py: Properly increase the reference counter of Py_None.
2009-01-06 04:13:57 +01:00
Jelmer Vernooij
58cfb1a9e1
python: Define Py_ssize_t if the Python library doesn't.
2008-12-23 11:26:31 +01:00
Jelmer Vernooij
c023828962
Fix missing symbols issues when building with shared libraries.
2008-12-22 21:03:09 +01:00
Jelmer Vernooij
84501f6b59
Raise proper exceptions when lp file can't be found, be a
...
bit less strict when no file was specified.
2008-12-22 06:34:18 +01:00