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

3019 Commits

Author SHA1 Message Date
Rusty Russell
d65bded0c2 source3/loadparm.c: Move string_set/string_free inside.
The only user, so make them static inside loadparm.c

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-07 23:20:05 +10:00
Andrew Bartlett
dc00df2add lib/param: Rename "socket address" to "nbt client socket address" to clarify role
This parameter is only used in our NBT client code and in nmbd as a
fallback when we fail to select a better interface from "interfaces"
to use directly.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 27 12:16:25 CEST 2012 on sn-devel-104
2012-07-27 12:16:25 +02:00
Andrew Bartlett
3367fd01d4 lib/param: Merge handling of security/domain master/domain logons/server role
This ensures that the same input parameters always gives the same
output values in both loadparm systems.

Andrew Bartlett
2012-07-24 11:01:17 +02:00
Andrew Bartlett
9521cd0409 param: Make the 'unicode' parameter common
This parameter is most useful for interop testing, rather than production use.

Andrew Bartlett
2012-07-24 10:46:12 +10:00
Andreas Schneider
a256d61c50 s3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.
We don't resolve our own "Domain Local" groups since bug #7843 has been
fixed. So we need to add the add resource groups to the sid list too.

Before bug #7843 the "Domain Local" groups were added with a
lookupuseraliases call, but this isn't done anymore for our domain
so we need to resolve resource groups here.

When to use Resource Groups:
http://technet.microsoft.com/en-us/library/cc753670%28v=WS.10%29.aspx

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul 23 22:12:30 CEST 2012 on sn-devel-104
2012-07-23 22:12:29 +02:00
Jeremy Allison
b336b8ed58 Remove source3/lib/pidfile.c
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 20 03:57:20 CEST 2012 on sn-devel-104
2012-07-20 03:57:20 +02:00
Jeremy Allison
0d24370c76 Make the s3 pidfile use the common code inside lib/util/pidfile.c 2012-07-19 16:08:49 -07:00
Jeremy Allison
2922fdaaf0 Move source4/smbd/pidfile into lib/util in preparation for making it in common. 2012-07-19 15:41:52 -07:00
Andrew Bartlett
0f57da57e3 lib/param: bring lp_smb_ports() into common by making it a list everywhere 2012-07-19 08:02:32 +02:00
Andrew Bartlett
cf9bd1d9ed s3-param: Make lp_name_resolve_order() return a list
This allows this parameter, one of the few with differing declarations
between the loadparm systems, to be brought into common.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-19 08:02:32 +02:00
Volker Lendecke
9dc78c90f3 s3-aio: Remove unused VFS functions and more
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:58 -07:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Jeremy Allison
d81e20653b Move set_thread_credentials_permanently() to set_thread_credentials()
as we need to keep the saved set uid/gid otherwise there is an
interaction with open[at]() and NO_ATIME returning EPERM. As this
is meant for threaded code inside the process we don't need
to do an irreverisble change anyway.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 11 03:54:00 CEST 2012 on sn-devel-104
2012-07-11 03:54:00 +02:00
Jeremy Allison
9d5e026bde Make check_same_stat() and check_same_dev_ino() common functions. 2012-07-09 12:26:56 -07:00
Jeremy Allison
90881da685 Move copy_unix_token() from locking/locking.c to lib/util.c.
Make public.
2012-07-03 15:34:22 -07:00
Jeremy Allison
a559fcf156 Add function set_thread_credentials_permanently(). Panic if fail.
Not yet used.
2012-07-03 15:34:22 -07:00
Andreas Schneider
d0878b3b81 s3-smbd: Remove deprecated 'share modes' option. 2012-07-03 21:56:49 +02:00
Andreas Schneider
98ab074094 s3-printing: Remove deprecated lp_printer_admin(). 2012-07-03 21:56:49 +02:00
Andrew Bartlett
666dba3353 s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
This helps clarify the role of this structure and wrapper function.

The purpose here is to provide helper functions to the lib/param
loadparm_context that point back at the s3 lp_ functions.  This allows
a struct loadparm_context to be passed to any point in the code, and
always refer to the correct loadparm system.  If this has not been
set, the variables loaded in the lib/param code will be returned.

As requested by Michael Adam.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
2012-06-27 17:11:16 +02:00
Michael Adam
73b200064f s3:util: rename procid_equal() to serverid_equal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:32 +02:00
Michael Adam
0159344d4c s3:util: remove (now) unused cluster_id_equal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:31 +02:00
Stefan Metzmacher
e89150597a Revert "s3-lib Remove unused sys_fcntl_long()"
This reverts commit 846a697e20.

This is still used in source3/smbd/oplock_irix.c

metze
2012-06-19 17:04:29 +02:00
Michael Adam
3309a52988 s3:lib: add a utility function "fsp_fnum_dbg" for logging the fnum of an fsp
This is to unify logging of an files_struct.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15 03:28:14 +02:00
Volker Lendecke
3b63a6794a S3: Add ntlmssp_set_password_hash
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12 10:48:15 +02:00
Stefan Metzmacher
36c7016cc0 s3:include: move sys_acl prototypes to smb_acls.h
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
8693a4fff9 s3:lib: split things into a conn_tdb.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jun  5 19:28:35 CEST 2012 on sn-devel-104
2012-06-05 19:28:35 +02:00
Andrew Bartlett
9f4b6fa0cc s3-param: Use same function name for "max xmit" as lib/param
Again, this helps with merging the FN_ list.

Andrew Bartlett
2012-05-30 04:15:12 +02:00
Andrew Bartlett
b47f9a09cd s3-param: Rename lp_dns_proxy() -> lp_wins_dns_proxy() for clarity
This avoids some confusion now we have a DNS server as well.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Jeremy Allison
c531aac27c Added torture test for bug #8910. Test remove_duplicate_addrs2().
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue May 22 01:31:17 CEST 2012 on sn-devel-104
2012-05-22 01:31:17 +02:00
Stefan Metzmacher
b2c9fe4ad1 lib/util: move tevent_req_poll_ntstatus() to tevent_ntstatus.c
metze
2012-05-14 15:12:34 +02:00
Andrew Bartlett
fc4c06f284 s3-lib: Add const to sys_acl_to_text 2012-05-09 04:21:05 +02:00
Christian Ambach
7a07ce2680 s3:util add sid_check_is_wellknown_builtin() 2012-05-01 09:32:11 +02:00
Andrew Bartlett
442a81e7b2 s3-lib Add a way to allocate the task_id value in server_id
This safely allocates the task_id so that when we have multiple event
contexts, they can each have their own messaging context, particularly
for the imessaging subsystem under source4.

Andrew Bartlett
2012-04-30 17:55:12 +10:00
Andrew Bartlett
ea5a9b21fb s3-build: move file_id.c into samba3-util and create a private header 2012-04-18 12:05:00 +10:00
Stefan Metzmacher
941a6a7851 s3:libsmb/ntlmssp: add ntlmssp_is_anonymous()
metze
2012-04-17 14:42:31 +02:00
Volker Lendecke
a49ac23a10 s3: Return CTDB_PATH from lp_ctdbd_socket()
All callers had that fallback
2012-04-17 10:21:00 +02:00
Andrew Bartlett
0eacc47622 param: Change from _lp to lp__ as the prefix for internal parameter wrappers
This will make a merge with the lib/param param code easier, as we can then paste lp_ to the front of
all parameters unconditionally.

Andrew Bartlett
2012-04-16 14:32:38 +10:00
Andrew Bartlett
cf28df1d90 make _lp_readraw() and _lp_writeraw() static 2012-04-16 14:32:38 +10:00
Christian Ambach
2a36408d40 s3:param convert kernel oplocks to share parameter
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-04-11 11:11:39 -07:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
19eee33d82 s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to removexattr.

Andrew Bartlett
2012-04-05 13:39:01 +10:00
Andrew Bartlett
c70ac29c54 s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
c5b17c5555 s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
b2f7cfa848 s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configure 2012-04-05 13:39:00 +10:00
Andrew Bartlett
f6e0532024 build: Remove SMB_STRUCT_DIR define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
6edd8e95f1 build: Remove sys_rewinddir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
3e8a6e5760 build: Remove sys_closedir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
ecc822faf8 build: Remove sys_telldir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
900473a45b build: Remove sys_seekdir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
afdb78075c build: Remove sys_readdir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
fe526bb32b build: Remove sys_opendir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
b74fe73a6f build: Remove sys_fopen wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
d166b79852 build: Remove sys_open wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
9cc056e567 build: Remove sys_creat wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
7fa1b878c1 build: Remove sys_ftell wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
43e9be8894 build: Remove sys_lseek wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
5c89d12ca4 build: Remove sys_ftruncate wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
473b974a06 build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more 2012-04-05 02:39:08 +02:00
Andrew Bartlett
4e3e323080 s3-libsmb: Remove unused spnego_parse_krb5_wrap()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Jelmer Vernooij
c9fb33697d use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace. 2012-03-24 22:41:05 +01:00
Jelmer Vernooij
14fdc1c5cd lib/util: Move calloc_array and memalign_array to top-level libutil. 2012-03-24 15:19:09 +01:00
Michael Adam
c80f70390c s3:smbd: let smbd/nmbd/winbindd child processes terminate if the parent process died.
This applies to all child processes making use of reinit_after_fork().
It is implemented by establishing a pipe between parent and child.
The child watches for EOF on the read end of the pipe, indidcating
an exited parent.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-15 18:41:37 +01:00
Andrew Bartlett
c318c94170 s3-param: Align lp_{max,min}protocol with lib/param names
This adds an alisas to ensure that both our loadparm systems know all
the names.

I would like to move to the 'server ..' name as canonical, and this
will be raised on the list.

Andrew Bartlett
2012-02-27 07:36:05 +01:00
Andrew Bartlett
cab24da68d s3-libsmb: Remove unused spnego_parse_auth_and_mic 2012-02-24 15:43:03 +11:00
Andrew Bartlett
bea05159e4 s3-libsmb: Remove unused spnego functions 2012-02-23 16:14:19 +11:00
Andrew Bartlett
476d503d24 lib/util: Remove unused sys_sendto()
Found by callcatcher.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 17 13:48:05 CET 2012 on sn-devel-104
2012-02-17 13:48:05 +01:00
Andrew Bartlett
245d47f233 lib/util: Remove unused sys_recv()
Found by callcatcher.

Andrew Bartlett
2012-02-17 12:19:30 +01:00
Andrew Bartlett
b190e3cd79 s3-lib: Remove unused standard_sub_conn() 2012-02-17 12:19:29 +01:00
Andrew Bartlett
846a697e20 s3-lib Remove unused sys_fcntl_long() 2012-02-17 12:19:29 +01:00
Andrew Bartlett
59d1faa1a3 s3-lib Remove unused sys_fseek() 2012-02-17 12:19:29 +01:00
Andrew Bartlett
d54404e565 s3-param Remove off-by-default and unused "send spnego principal"
This is not honoured by the common SPNEGO code.

This matches mondern windows versions which do not send this value, as
it would be insecure for a client to rely on it.  (See also the
depricated client use spnego principal directive).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-02-16 15:18:43 +01:00
Andrew Bartlett
474fbfb7b7 s3-lib: Remove unused is_myworkgroup()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:14 +11:00
Andrew Bartlett
45123530e5 s3-charcnv: Remove unused rpcstr_push()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:14 +11:00
Andrew Bartlett
3d63100890 s3-param: Remove unused share_defined()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:13 +11:00
Andrew Bartlett
40bf23d862 s3-lib: Remove unused pid_path()
piddir.c calls lp_piddir() directly.

Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:12 +11:00
Andrew Bartlett
3b88c1e605 s3-charcnv: Remove unused pull_string_fn
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:12 +11:00
Jeremy Allison
502186fe0c Remove unused get_file_size() function.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Feb  7 20:56:28 CET 2012 on sn-devel-104
2012-02-07 20:56:28 +01:00
Andreas Schneider
03c3a613c5 s3-libsmb: Remove dead prototype.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Feb  2 10:33:13 CET 2012 on sn-devel-104
2012-02-02 10:33:13 +01:00
Andreas Schneider
8080dbad78 s3-lib: Fix util_cmdline which doesn't use popt.
This creates its own header file for util_cmdline so it doesn't need to
link against popt.
This should fix linking on FreeBSD.
2012-02-01 21:54:21 +01:00
Jeremy Allison
d6950d4ec9 Comment out sys_get_number_of_cores() as we're no longer using this. 2012-01-06 14:55:30 -08:00
Andrew Bartlett
fd69ebda26 s3-ntlmssp Remove unused ntlmssp_set_hashes() and do not set an invalid LM hash
When E_deshash() returns false, it indicates that the password is either > 14 chars
in length, or could not be represented as an LM hash value for some other
reason.  In this case, we should not regard the LM hash being missing
as an error or a no-password situation.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan  6 14:59:13 CET 2012 on sn-devel-104
2012-01-06 14:59:12 +01:00
Jeremy Allison
e8a7d9c822 Add a sys_get_number_of_cores() function that calls sysconf or sysctl
and tunes the aio threads.
2012-01-06 02:42:25 +01:00
Stefan Metzmacher
611ab8aaa7 s3:lib/dummyparam: remove unused conn_snum_used() dummy
metze
2011-12-13 15:45:36 +01:00
Stefan Metzmacher
1399e6bdf5 s3:param: don't reference conn_snum_used directly in load_usershare_shares()
This uses the same logic as lp_killunused().

metze
2011-12-13 15:45:36 +01:00
Volker Lendecke
0f9d14820e s3: Remove a bunch of calls to procid_self()
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Volker Lendecke
29735327f6 s3: Add some const
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov 25 10:21:07 CET 2011 on sn-devel-104
2011-11-25 10:21:07 +01:00
Andrew Bartlett
9524e2fce1 param: calculate server role from security, and security from server role
This allows smb.conf files from either the samba3 or samba4 tradition
to come to the same value of server role, using the information in the
smb.conf file.

This is important so that tools like 'net getlocalsid' work against a
Samba4 AD installation (yes, users have tried this).

Andrew Bartlett

Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
2011-11-17 00:34:08 +01:00
Andrew Bartlett
f099feaa01 s3-param remove lp_domain_logons(), always use IS_DC
This makes the code internally consistant.

Andrew Bartlett

Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
2011-11-17 00:34:08 +01:00
Amitay Isaacs
d97acc8fb9 s3-param: Add "server role" as global parameter
This will help extracting server role processing code in common
library.
2011-11-17 00:34:08 +01:00
Günther Deschner
16627ca313 s3-trustdomcache: make enumerate_domain_trusts() static.
Guenther
2011-11-02 16:59:32 +01:00
Volker Lendecke
ba0171f724 s3: Add processes_exist 2011-10-27 20:28:31 +02:00
Stefan Metzmacher
7682f61e10 s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
metze
2011-10-26 15:33:30 +02:00
Stefan Metzmacher
6d2aaef787 s3:include: make smb_setlen() a macro
metze
2011-10-21 08:43:00 +02:00
Stefan Metzmacher
d825a2add6 s3:libsmb/smb_seal: move smb_set_enclen() to smb_seal.c and make it static there
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 19 19:06:35 CEST 2011 on sn-devel-104
2011-10-19 19:06:35 +02:00
Michael Adam
bdee9458f6 s3:sessionid: use dbwrap_travers_read() in sessionid_travers_read()
This also changes the return code of sessionid_traverse_read() to NTSTATUS.
It also uses traverse_read instead of traverse.
2011-10-11 14:17:56 +02:00
Michael Adam
6656de1346 s3:sessionid: use dbwrap_travers() in sessionid_traverse()
This also changes sessionid_traverse to NTSTATUS return type.
2011-10-11 14:17:56 +02:00
Andrew Bartlett
7d33ec3dfe lib/util: consolidate module loading into common code
This creates a samba-modules private libary that handles the details.

Andrew Bartlett
2011-10-06 07:18:07 +02:00
Stefan Metzmacher
66f8070dd3 lib/util: move some timespec helpers from source3 to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
2011-09-23 00:15:31 +02:00
Jeremy Allison
fbbfdbd648 Fix bug #8229 - git patch attached against 3.6.0-rc2 to fix 'widelinks' regression intro'd in 3.2
Add "allow insecure widelinks" to re-enable the ability (requested
by some sites) to have "widelinks = yes" and "unix extensions = yes".

Based on an original patch by Linda Walsh <samba@tlinx.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep 14 03:55:45 CEST 2011 on sn-devel-104
2011-09-14 03:55:45 +02:00
Andrew Bartlett
1aced1e989 s3-auth remove sanitized_username from auth_serversupplied_info
This structure element was only written to, not read.

It is filled into the companion structure, auth_session_info()
by create_local_token().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:04 +10:00
Andreas Schneider
cca96e4726 s3-rpc_server: Added common function to create tcpip socket. 2011-08-01 08:50:34 +02:00
Volker Lendecke
190b5432f0 s3: Make map_open_params_to_ntcreate() available in lib/ 2011-07-29 16:43:17 +02:00
Volker Lendecke
0102c6e2bc s3: Make is_executable() available in lib/ 2011-07-29 16:43:17 +02:00
Michael Adam
c2aa8e5d63 s3:loadparm: make lp_set_in_client() static - only used in wrappers in loadparm now. 2011-07-28 11:17:29 +02:00
Michael Adam
4e41d38df3 s3:loadparm: add wrapper lp_load_client_no_reinit() 2011-07-28 11:17:28 +02:00
Michael Adam
5676fbb399 s3:loadparm: add wrapper lp_load_globals_no_reinit() 2011-07-28 11:17:28 +02:00
Michael Adam
0b21c7750f s3:loadparm: make lp_is_in_client() static - only used inside loadparm 2011-07-28 11:17:26 +02:00
Michael Adam
37f548d788 s3:loadparm: add lp_load_client() that also sets the client state internally 2011-07-28 11:17:26 +02:00
Michael Adam
1379ef8b7b s3:loadparm: add a convenience wrapper lp_load_global()
This is the use case for most callers, especially the client tools.
2011-07-28 11:17:25 +02:00
Christian Ambach
4370dc11bd s3:afs make path argument to afs_syscall const 2011-07-21 14:55:08 +02:00
Andrew Bartlett
6f4c093729 s3-lib Remove unused get_cmdline_auth_info_copy 2011-07-14 15:06:45 +10:00
Andrew Bartlett
0e4a4c8b19 s4-param finish services hooks for s4->s3 loadparm context 2011-07-14 15:06:45 +10:00
Stefan Metzmacher
7d757d6ac3 s3:libsmb: remove unused smb_dos_errstr()
metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
f0e6e5c37d s3:libsmb: remove unused enum smb_read_errors infrastructure
metze
2011-07-08 14:09:08 +02:00
Andrew Bartlett
cda8686940 lib/param: Merge struct loadparm_service into common
This is handled by a common header and a .c file that is included into
both loadparm.c files.

In the process, _lp functions were renamed to lp__ to allow the common
function definition declarations to be used by source3 and source4
(which have different macro definitions).

The only parameter to change type is 'strict_locking' which was a
bool, and is now an int, to accommodate the 'Auto' value from source3.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jul  8 12:35:56 CEST 2011 on sn-devel-104
2011-07-08 12:35:56 +02:00
Andrew Bartlett
6e6aaacedb lib/util Move bitmap.c to lib/util 2011-07-08 11:23:23 +02: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
fad3c763f7 s3-param Remove lp_set_passdb_backend() 2011-07-08 11:23:23 +02:00
Volker Lendecke
1c022d2e41 s3: Return "granted" from share_access_check
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-05 13:28:03 +02:00
Andreas Schneider
b2511a280a s3-smbd: Remove obsolete smbd_set_server_fd().
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:36 +10:00
Andreas Schneider
c663dfff88 s3-util: Add a get_remote_hostname() function.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:55 +10:00
Andrew Bartlett
d4ef70a764 param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()
Jermey started this in 1997 with 0aa493cc03

(avoiding the duplicate function makes it easier to generate the
struct loadparm_globals).

Andrew Bartlett
2011-07-02 12:31:34 +10:00
Andrew Bartlett
489f528857 param: Merge param headers into lib/param/loadparm.h
This defines a common table format, so we can in future define a
common table.

Andrew Bartlett
2011-06-29 15:44:09 +10:00
Andrew Bartlett
e63d5d2cd5 s3-param use lp_parm_ptr() rather than parm.ptr directly
This will help with a change from .ptr to .offset

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun 29 03:26:21 CEST 2011 on sn-devel-104
2011-06-29 03:26:21 +02:00
Andrew Bartlett
734e1b6812 s3-param Remove 'announce version' parameter
The only users I can find of this on the internet involve confused
users, and our own documentation recommends never setting this.  Don't
confuse our users any longer.

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Andrew Bartlett
125a2ff262 lib/util/charset: Remove 'display charset'
As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:
http://lists.samba.org/archive/samba-technical/2011-June/078190.html

Setting this to a value other than 'unix charset' does not make sense,
as any system where the filesytem charset does not equal the terminal
charset will already have problems with programs as simple as 'ls'.
It also means that our output could not be pasted as our input in
interactive programs or onto our command line, as we never did
translate in the DISPLAY -> UNIX direction.

The d_printf() calls are retained in case we need to revisit this, and
to support display_set_stderr().

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Michael Adam
472759a1e4 s3: remove prototype of convert_string_error from proto.h
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Jun 23 12:34:31 CEST 2011 on sn-devel-104
2011-06-23 12:34:30 +02:00
Michael Adam
8683490748 s3: remove prototype of convert_string from proto.h 2011-06-23 11:22:04 +02:00
Volker Lendecke
f811e894c4 s3: Add name_resolve_bcast_send/recv 2011-06-19 14:03:51 +02:00
Andrew Tridgell
264409750a s3-util: remove the s3 nterr.c
this is now in common code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17 17:09:00 +10:00
Michael Adam
9923a8cf43 s3:proto.h: remove prototypes of error functions moved to common code.
ntstatus_to_dos, werror_to_ntstatus, ntstatus_to_werror

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jun 13 03:31:58 CEST 2011 on sn-devel-104
2011-06-13 03:31:57 +02:00
Volker Lendecke
0dfcf3ef78 s3: Add resolve_wins_send/recv 2011-06-12 17:07:48 +02:00
Volker Lendecke
396b646123 s3: Add wins_server_tag_ips()
For a given tag, return the list of all wins servers
2011-06-12 17:07:48 +02:00
Volker Lendecke
ebf04d79ab s3: Remove "struct ip_service" from resolve_wins 2011-06-12 17:07:47 +02:00
Richard Sharpe
de8eb77e91 Export init_stat_ex_from_stat for use in VFS modules.
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jun 10 13:23:37 CEST 2011 on sn-devel-104
2011-06-10 13:23:37 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
0e95311c23 s3-lib Add myhostname_upper()
This varient always upper cases the hostname, which is needed for the
netbios name.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
f348d148b4 s3-param Remove special case for global_scope()
There is no reason this can't be a normal constant string in the
loadparm system.  (Past reasons were that we didn't have lp_set_cmdline())

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
3ccc760947 s3-param Remove special case for lp_workgroup()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
16b1c77644 lib/util Bring procid_str() into lib/util as server_id_string()
This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
8459391e31 s3-talloc Remove unused TALLOC zeronull functions and macro definitions
These have been under #if 0 for a long time now.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Andrew Bartlett
de46ad9084 lib/util use modules_path(), data_path() and shlib_ext() from source3
This brings these helpful utility functions in common, as they are not
based on either loadparm system.

(The 'modules dir' parameter from Samba4 will shortly be removed, so
there is no loss in functionality)

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
876b1b3d19 s3-lib Remove unused lib_path() 2011-06-06 17:37:51 +10:00
Andrew Bartlett
1dfc6fa558 s4-param Add hook between Samba3 and Samba4 loadparm systems.
In the top level build, this allows calls to code that requires a
lpcfg_ style loadparm_context, while using the global parameters
loaded from the source3 loadparm code.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
5a8218b147 s3-param Make lp_ncalrpc_dir() const
This disables % substitutions in the 'ncalrpc dir' parameter.  This is
used as a communication point between multiple parts of the codebase,
and needs to be internally consistent between all the Samba tasks.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 05:30:53 CEST 2011 on sn-devel-104
2011-06-01 05:30:53 +02:00
Andrew Bartlett
b9d61ef55a s3-param Make lp_dedicated_keytab_file() const
This disables % substitutions in the 'dedicated keytab file' parameter.

Andrew Bartlett
2011-06-01 04:19:06 +02:00
Andrew Bartlett
edc3041093 s3-param Make lp_realm() const
This disables % substitutions in the 'realm' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
860b43737c s3-param Make lp_name_resolv_order() const
This disables % substitutions in the 'name resolv order' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
08a72f3a15 s3-param Make lp_utmpdir() and lp_wtmpdir const
This disables % substitutions in the 'utmp dir' and 'wtmp dir'
parameters.  These are system paths, and need to be consistent between
all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
47ece3f897 s3-param Make lp_piddir() const
This disables % substitutions in the 'pid dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a0758bb5e5 s3-param Make lp_cachedir() const
This disables % substitutions in the 'cache dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
9aef68f4c2 s3-param Make lp_statedir() const
This disables % substitutions in the 'state dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
5f176378a8 s3-param Make lp_lockdir() const
This disables % substitutions in the 'lock dir' parameter.  This is
used all over the codebase, and needs to be internally consistent
for the life of the process, as they determine the location of
our locking databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f331936db2 s3-param Make lp_smb_passwd_file() and lp_private_dir() const
This disables % substitutions in the 'smb passwd file' and 'private
dir' parameters.  These are used all over the codebase, and need to be
internally consistent for the life of the process, as they determine
the location of secrets.tdb, as well as the passdb databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a74e7fbc6a s3-param Make lp_smb_ports() const
It makes no sense to have a % substiution in the 'smb ports' parameter.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f52b97a129 s3-param Make charset parameters const
This removes the dangerous ability for these parameters to change
based on % substitutions.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
ec9ff19e60 s3-param Make lp_passwordserver() const.
This means that it no longer takes % substituations, and so the documentation for this behaviour is removed from the smb.conf manpage.  (This mode is only useful in security=server, which is already marked as deprecated in 3.6).

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Jeremy Allison
1cee71713f Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).
Part of the efforts to remove PATH_MAX on modern systems.
2011-06-01 02:54:51 +02:00
Andrew Bartlett
52399f3177 lib/util Move sys_memalign into lib/util/system.c 2011-05-31 02:57:19 +02:00
Andrew Bartlett
a5a2373979 s3-lib Move sstring_sub() to it's only user and make static
This should not be used more generally, as it is specifically not for
multibyte strings, and uses malloc rather than talloc.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
8d639feed9 s3-param Move init_iconv() to loadparm.c
This assists with some dependency loops

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
381423b1bd libcli/security: move secdesc.c to the top level libcli/security
This code does not rely on lp_ or other source3 only functions, so can
be part of the common library.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
e5dd03d199 s3-globals Remove smbd_event_context() (use server_event_context())
This has been a wrapper around server_event_context() for some time
now, and removing this from dummmysmbd.c assists with library
dependencies.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
8524924a46 s3-smbd provide struct smbd_server_connection * to conn_snum_used
This provides the 'sconn' parameter to this key functions, that
is currently duplicated in dummysmbd.c, which causes duplicate symbol
issues in the waf build.

This has natrually caused a number of consequential changes across the
codebase, includning not passing a messaging context into initial
reload_services():

This causes problems because the global smbd_server_connection isn't
yet set up, as there isn't a connection here, just the initial
process.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
da662b82b8 s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
7a11e5de39 s3-param: Remove unused snum2params_static 2011-05-18 16:12:08 +02:00
Andrew Bartlett
b3258addb4 s3-param: remove unused share_iterator functions 2011-05-18 16:12:08 +02:00
Günther Deschner
854467851d s3-printing: Get the location info from cups.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-05-16 12:54:33 +02:00
Andrew Tridgell
45e26fdeec s3-smbd: expose smbd_set_server_fd()
this allows the fd to be setup by subsystems that want to use the s3
server core code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun May  8 12:01:13 CEST 2011 on sn-devel-104
2011-05-08 12:01:13 +02:00
Günther Deschner
675573d54b s3-includes: finally only include client.h when libsmb is used.
Guenther
2011-05-06 16:37:22 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Günther Deschner
41134f7f4b s3-proto: remove some duplicate prototypes.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri May  6 16:21:08 CEST 2011 on sn-devel-104
2011-05-06 16:21:08 +02:00
Andrew Bartlett
8f1810362d lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch()
gen_fnmatch was a duplicate symbol in the top level build.

gen_fnmatch() used for simple non-CIFS pattern matching, so selecting
the lib/util implementation should not be a concern.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
344eb08ee4 nterr: Add mem_ctx for return string from get_nt_error_c_code()
It is clearer to avoid the implicit return on talloc_tos()

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Jeremy Allison
a5a84415e2 Fix broken interface to set_namearray() - don't modify incoming string. 2011-05-06 01:44:07 +02:00
Jeremy Allison
e131c94ac1 More const fixes for compiler warnings from the waf build. 2011-05-05 23:56:07 +02:00
Jeremy Allison
4f41be356a Fix many const compiler warnings. 2011-05-05 10:41:59 -07:00
Jeremy Allison
ff215f5c89 I added them, so I get to kill them :-). Finally remove all uses of safe_strcpy and safe_strcat. Change to strlcpy, strlcat.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May  4 22:14:14 CEST 2011 on sn-devel-104
2011-05-04 22:14:14 +02:00
Günther Deschner
b8eaec6b66 s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr static.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed May  4 12:31:10 CEST 2011 on sn-devel-104
2011-05-04 12:31:09 +02:00
Günther Deschner
9c48345e32 s3-proto: move remaining krb5 protos to krb5_protos.h
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue May  3 15:38:40 CEST 2011 on sn-devel-104
2011-05-03 15:38:40 +02:00
Andrew Bartlett
80f1d49b61 lib/util/charset Use push_string and talloc_strupper/strlower from common code
The only caller of push_string() (not to be confused with
push_string_check()) in the common code was encode_pw_buffer(), and it
didn't use the alignment or STR_UPPER flags.

The talloc_strupper() and talloc_strlower() functions are tested in
smbtorture, and are next_codepoint() based.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
7c083caf74 s3-lib make push_ucs2() static 2011-05-03 07:37:07 +02:00
Andrew Bartlett
fbea52f74a lib/util Move more network utility functions from source3 into lib/util
This will help with the merge of the interfaces layer.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Günther Deschner
56cd3b3bbb s3-rpc_server: (re)move last globally included rpc_server prototypes.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May  2 16:05:31 CEST 2011 on sn-devel-104
2011-05-02 16:05:31 +02:00
Günther Deschner
daa02f34b1 s3-proto: move remaining srvsvc protos to own header file.
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
c233c21425 s3-proto: move remaining spoolss protos to own header file.
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
047d8c073b s3-proto: move more rpc_server prototypes out of proto.h
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
c6fe379a46 s3-rpc_server: remove proto of nonexisting function
(rpc_pipe_register_commands).

Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
c1f3ff7340 s3-util: move valid_share_pathname() to lib/util.c
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
49d5f62b42 s3-proto: move rpc_srv_register protos and structs to town headerfile.
Guenther
2011-05-02 15:03:43 +02:00
Volker Lendecke
d87427973c s3: Make name_resolve_bcast return sockaddr_storage
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Apr 30 20:40:46 CEST 2011 on sn-devel-104
2011-04-30 20:40:46 +02:00
Volker Lendecke
020b691cf8 s3: Remove ip_sevice from get_ipc_connect_master_ip
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Apr 30 18:16:28 CEST 2011 on sn-devel-104
2011-04-30 18:16:28 +02:00
Andrew Bartlett
1018dd1826 s3-lib: Rely on uint64_t in conv_str_size()
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Apr 30 05:58:35 CEST 2011 on sn-devel-104
2011-04-30 05:58:35 +02:00
Günther Deschner
bbacaec4e9 s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 22:05:07 CEST 2011 on sn-devel-104
2011-04-29 22:05:07 +02:00
Günther Deschner
bc781bf7d9 s3-proto: remove duplicate prototypes.
Guenther
2011-04-29 21:01:05 +02:00
Günther Deschner
c7d38f49c8 s3-proto: move rpc_server/rpc_handles.c protos to ntdomain.h
Guenther
2011-04-29 21:01:04 +02:00
Günther Deschner
faf1175125 s3-proto: move more librpc prototypes to librpc/rpc/dcerpc.h
Guenther
2011-04-29 21:01:04 +02:00
Günther Deschner
d6289641f5 s3-proto: remove remaining nss_info prototypes to nss_info.h
Guenther
2011-04-29 21:01:04 +02:00
Günther Deschner
12476223c6 s3-tsocket: only include ../lib/tsocket/tsocket.h where needed.
Guenther
2011-04-29 12:19:04 +02:00