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

142 Commits

Author SHA1 Message Date
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Michael Adam
3bccd2f3f3 s3:net conf: fix a comment typo 2011-02-07 18:37:42 +01:00
Günther Deschner
e9f5bdf6b5 smbconf: only include smbconf headers where needed.
Guenther
2010-05-18 10:36:33 +02:00
Jim McDonough
61bdffbf8e Fix i18n of net conf import error message.
Thanks gd
2010-04-20 17:45:06 -04:00
Jim McDonough
a22f03e02c Display an error on net conf import failures.
When something goes wrong, such as a typo in a parameter
name, we'll now display the failure instead of just returning
with -1 and no message.
2010-04-20 16:28:47 -04:00
Michael Adam
09f3ed1024 s3:make "net conf addshare" atomic by wrapping all writes in one transaction
Michael
2010-02-12 23:12:12 +01:00
Kai Blin
66de52c4f4 s3 net: Fix compile warnings 2010-01-19 14:48:34 +01:00
Kai Blin
09bc13728f s3 net/i18n: Use only one spelling for "Usage:" 2010-01-19 10:07:36 +01:00
Björn Jacke
bd3c922e2b s3/net: split up some printable stings to ease i18n
If we put strings like "Usage:" into separate _() macros and not the whole
"Usage:..." string we can cover much more messages by only one single
translation. The drawback is that the message in the sources looks less pretty.
2010-01-18 23:45:05 +01:00
Volker Lendecke
5915996452 s3: "net_conf_addshare" only looks at the mode 2009-11-29 11:22:03 +01:00
Volker Lendecke
44ce5603dd s3: Pass the "fake dir create times" parameter to sys_*stat
Step 0 to restore it as a per-share paramter
2009-11-29 11:22:01 +01:00
Kai Blin
51f9d1ecd5 s3 net: i18n support for net conf 2009-07-30 09:00:31 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Michael Adam
2722dd357c s3:fix bug #6371, unsuccessful net conf setparm leaves empty share
Wrap creation of share and setting of parameter into a transaction.

Michael
2009-05-17 22:19:24 +02:00
Michael Adam
38d02c5d85 s3:net conf: support dangling parameters by specifying "" as the section name.
for {get,set,del}parm

Michael
2009-04-27 11:21:02 +02:00
Martin Schwenke
448b434a86 In net_conf_import, start a transaction when importing a single share.
Commit d69c3db9d44ad5d9fd1f5d7a9499f3bd79ecfb47 caused the transaction
start to be conditional but the commit is still unconditional, so an
error occurs when importing a single share.

An alternate fix would be to return the transaction start to be
unconditional but then it would occur before other error checking.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Michael Adam <obnox@samba.org>
2009-04-16 10:38:38 +02:00
Andrew Bartlett
3b3e21bd9b Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API

To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c

(the actual implementation remains distinct, but the API is now shared)

Andrew Bartlett
2009-04-14 12:53:56 +10:00
Michael Adam
36c1a52a57 s3:net conf: don't store share names as lower case, but as given.
Michael
2009-04-02 00:30:13 +02:00
Michael Adam
0945789031 s3:net conf: reduce memory usage of "net conf import".
"net conf import" was wrapped in one big transaction.
This lead to MAX_TALLOC_SIZE being exceeded at roughly
1500 shares. This patch resolves that problem by
limiting the top level transactions in "net conf import"
to 100 shares.

Michael
2009-03-04 22:49:24 +01:00
Michael Adam
42b8d6b308 s3:net: wrap net conf import into one big transaction
This speeds up "net conf import" of a file with 2000 shares
from 11 minutest to 1m50s on my box.

Michael
2009-02-26 11:05:23 +01:00
Michael Adam
55f2cb18ad s3:net conf: remove check for sharename being a usernam in "net conf addshare"
This is useless and can be overriden by "net conf setparm" anyways.

Michael
2009-02-06 11:05:50 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Kai Blin
255bdb2602 net: Rename functable3 to functable, get rid of old functables
(This used to be commit bb7c5fc4ec)
2008-06-10 09:48:21 +02:00
Kai Blin
1be1be3334 net: Make "net conf" use a functable similar to functable3
(This used to be commit b8382bc3af)
2008-06-10 09:48:03 +02:00
Kai Blin
f576910944 net: Remove globals
(This used to be commit 1e9319cf88)
2008-05-10 09:22:27 +02:00
Michael Adam
fb9232c0a9 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
(This used to be commit 17415e2dc4)
2008-04-23 01:43:31 +02:00
Michael Adam
ed85ea4248 net conf: adapt output of NULL share params in net conf list.
don't list NULL share name and don't indent these parameters

Michael
(This used to be commit 0212b38913)
2008-04-15 17:40:27 +02:00
Michael Adam
770b1923dc net conf: simplify logic in test output of net conf import.
Michael
(This used to be commit 367c8b133b)
2008-04-15 17:40:27 +02:00
Michael Adam
7624bab963 net conf: fix output of out-of-share parameters in test mode import
Michael
(This used to be commit 5424e07e7d)
2008-04-15 17:40:27 +02:00
Michael Adam
d2d82394a4 net conf: use the new smbconf_init() dispatcher instead of explicit backend init.
Michael
(This used to be commit 281c9287a3)
2008-04-13 20:04:44 +02:00
Michael Adam
35d6068f25 libsmbconf: remove the bool verbatim parameter from txt backend init function.
Always be verbatim for now. Backend config options may be added later
via some private data pointer.

Michael
(This used to be commit e8bafcfbf4)
2008-04-13 20:04:43 +02:00
Michael Adam
bfc4aba398 net conf: use talloc and talloc_strdup_lower throughout all net conf functions.
Michael
(This used to be commit 977cc98989)
2008-04-10 01:29:03 +02:00
Michael Adam
6f7fcdcda5 net conf: implement "net conf delincludes".
usage: "net conf delincludes <servicename>"

This is equivalent to "net conf setincludes <servicename>"
(without further arguments).

Michael
(This used to be commit a1d09f34ec)
2008-04-10 01:29:03 +02:00
Michael Adam
f3cfc1446e net conf: implement a "net conf setincludes" command.
given zero or more filenames as command line parameters

Michael
(This used to be commit ab51e4d44c)
2008-04-10 01:29:03 +02:00
Michael Adam
68fb75857b net conf: implement "net conf getincludes".
Michael
(This used to be commit 30bc48623c)
2008-04-10 01:29:02 +02:00
Michael Adam
9765828d97 net conf: add diagnostic message for failure to load text file.
Michael
(This used to be commit 8f2c3efa67)
2008-04-10 01:29:02 +02:00
Michael Adam
52a16b4945 net conf: reduce indentation by grouping testmode code together.
Michael
(This used to be commit 97f9cb8575)
2008-04-10 01:29:02 +02:00
Michael Adam
2a94369946 net conf: don't drop config in testmode
Michael
(This used to be commit 74e87b9775)
2008-04-10 01:29:02 +02:00
Michael Adam
a98c08c151 net conf: fix import to correctly add includes (at the end)
Michael
(This used to be commit 3e81db8370)
2008-04-10 01:29:02 +02:00
Michael Adam
3d38f143df libsmbconf: add a "verbatim" parameter to smbconf_init_txt_simple().
Michael
(This used to be commit b9e72b402d)
2008-04-10 01:28:56 +02:00
Michael Adam
65b4a93c4a net_conf: fix non-testmode import function.
Michael
(This used to be commit cd17cc745a)
2008-03-27 00:32:09 +01:00
Michael Adam
0bdcc557ee net_conf: reformat - re-indent one function call.
Michael
(This used to be commit 9ef9d4c4e7)
2008-03-26 14:55:06 +01:00
Michael Adam
3253cffced net_conf: add casts to avoid compiler warnings.
Michael
(This used to be commit 1c6b9a0ac3)
2008-03-26 14:55:06 +01:00
Michael Adam
0234cc8bdd net_conf: rename "ctx" to "mem_ctx" for clarity.
There are also smbconf contexts arount...

Michael
(This used to be commit 5171df66eb)
2008-03-26 14:55:06 +01:00
Michael Adam
c2acc30bcb net_conf: use talloc_stackframe() instead of talloc_init().
Michael
(This used to be commit ab4fd03705)
2008-03-26 14:55:06 +01:00
Michael Adam
ca2f9297c2 net_conf: fix import function by using the new text backend of smbconf.
Originally, lp_load() was used to import files to registry.
This had several bugs. Most notably, options explicitly set to
default values were silently dropped, and all parametric options
were ignored.

This new implementation reads config from the text backend and
stuffs everything verbatim in to the registry backend.

Michael
(This used to be commit e41c6650f8)
2008-03-26 14:55:06 +01:00
Michael Adam
6f7cfeddd6 libsmbconf: add a "path" variable to the conf context.
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.

In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.

Michael
(This used to be commit 96434d9dc7)
2008-03-21 18:19:24 +01:00
Michael Adam
fececde181 libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
(This used to be commit b3f6920ccb)
2008-03-21 02:25:56 +01:00
Michael Adam
23b1d721b8 libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
(This used to be commit 797b26ad3f)
2008-03-21 02:25:56 +01:00
Michael Adam
adf5bf554c libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
(This used to be commit d7bd9bb8aa)
2008-03-21 02:25:56 +01:00