1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

3689 Commits

Author SHA1 Message Date
Stefan Metzmacher
c6ed8e3211 s3:utils: make use of cli_tree_connect()
metze
2011-11-24 19:02:32 +01:00
Jeremy Allison
82b1702284 Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov 18 23:50:50 CET 2011 on sn-devel-104
2011-11-18 23:50:50 +01:00
Andrew Bartlett
87bbe1be5f s3-net Do not look for a local SID when we are a DC
If we are actually a DC, then the only SID we have is the domain SID,
and looking for it under the local name fails if we are a Samba4 AD DC.

Andrew Bartlett
2011-11-17 00:34:09 +01:00
Günther Deschner
65e2944c67 s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
636fa7a2cd s3-net: use better state variable name for smbldap_state.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
8312ee1367 s3-passdb: split out passdb/pdb_ldap_schema.c
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
28f8ccbe8b s3: move smbldap_util to pdb_ldap_util.
Guenther
2011-11-16 12:26:26 +01:00
Stefan Metzmacher
92a6f577ce s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Björn Baumbach
bdc973b5db s3-utils: net - Fix one error/usage message
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:40 +01:00
David Disseldorp
8b375eef24 s3: fix typo in net ads join output
Space missing from "DNS update in aclustered setup".

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Mon Oct 31 16:01:35 CET 2011 on sn-devel-104
2011-10-31 16:01:35 +01:00
Günther Deschner
151bb290d1 s3-net: Make sure to always re-use the "good" dc for the DNS updates as well.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 19:13:49 CEST 2011 on sn-devel-104
2011-10-28 19:13:49 +02:00
Björn Baumbach
2fac12b276 s3-util: dbwrap_tool: fix fetch_string function
We do not want truncated strings.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
2011-10-26 04:17:05 +02:00
Gregor Beck
f881d43837 s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Gregor Beck
4fe5e091e1 s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Björn Baumbach
196fd14788 s3-util: dbwrap_tool: add fetch fuctions for hex and string
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-18 20:58:26 +02:00
Björn Baumbach
140b5d790a s3-util: dbwrap_tool: add store hex function
Allows the user to store hex blobs in a tdb.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-18 20:58:26 +02:00
Andrew Bartlett
0c6e4adcb2 ntlmssp: Move ntlmssp code to auth/ntlmssp
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Jeremy Allison
7c663731ba Remove unused function. 2011-10-14 14:01:24 -07:00
Günther Deschner
af82bf2ac5 s3-net: Fix uninitialized variable in rpc_conf_import_internal().
Michael, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 14 19:25:47 CEST 2011 on sn-devel-104
2011-10-14 19:25:47 +02:00
Michael Adam
b15d3251ac s3:net registry: fix segfault when net registry is called without subcommands...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 14 17:51:53 CEST 2011 on sn-devel-104
2011-10-14 17:51:53 +02:00
Björn Baumbach
df9c4b0702 s3-utils: add capabilities to dbwrap_tool
Make it possible to work with strings in addition to int32 and uint32.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-14 15:11:09 +02:00
Gregor Beck
89b76b5611 s3:smbcacls: fix violation of coding conventions
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
491afa3a4c s3:net: avoid unnecessary initialization of the registry.
This allows for using help without having access to the registry and
prevents update code to run if only a readonly check is to be performed.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
502f0b8edc s3:net: add command registry check
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
e430c75d4c s3:net: factor out interact_edit()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Michael Adam
b8eec18e39 s3:smbcacls: make get_domain_sid() static 2011-10-12 22:45:52 +02:00
Simo Sorce
995d156726 s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Gregor Beck
9d688cd7be s3:smbcacls fix leaking talloc stackframce on tcon failure
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
858e4cb1b6 s3:smbcacls fix possible SEGFAULT
sddl_encode returns NULL on failure

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
724b48bc08 s3:smbcacls add option domain-sid
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
61631f427a s3:smbcacls get_domain_sid for sddl parsing/formating from lsarpc
get_global_sid panics if we are not root and may give the wrong answer anyway.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
2c78d4c89d s3:smbcacls pretty print acl control field
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
7458aac0f1 s3:net: convert net idmap check to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
1f57f9ed13 s3:net: convert net idmap to use only dbwrap wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
c8924ecc41 s3:net: convert net serverid to only use dbwrap wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:56 +02:00
Michael Adam
5bfdd73a64 s3:net: fix the exit code of net serverid wipe 2011-10-11 14:17:56 +02:00
Michael Adam
86455646e3 s3:net: fix the exit code of net serverid list 2011-10-11 14:17:56 +02:00
Michael Adam
0b7108b342 s3:dbwrap_torture: convert to using wrapper functions only 2011-10-11 14:17:56 +02:00
Michael Adam
64748e8eec s3:dbwrap_tool: convert to using wrapper functions only 2011-10-11 14:17:56 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00
Michael Adam
8f098a635f s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an additional parameter 2011-10-11 14:17:55 +02:00
Michael Adam
7a72c84ee7 s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.h 2011-10-11 14:17:55 +02:00
Günther Deschner
7119c8ba14 s3-net: when all DNS servers fail to operate, the overal DNS registration result
must be a failure.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 10 15:59:20 CEST 2011 on sn-devel-104
2011-10-10 15:59:20 +02:00
Stefan Metzmacher
2a6c5c8edb s3:utils: avoid '//' comments
The compiler on openindiana doesn't like them.

metze
2011-10-08 07:24:14 +02:00
Kai Blin
da0cae010a s3 net: Fix a discard const warning 2011-09-28 02:02:35 +02:00
Kai Blin
b02bbf237c net: Don't register link local addresses with DNS 2011-09-24 21:46:06 -07:00
Michael Adam
4d30fd8c51 s3:dbwrap_tool: add popt support and standard samba options 2011-09-20 06:28:28 +02:00
Volker Lendecke
49233b41e6 s3: Fix "ISO C90 forbids mixed declarations and code" 2011-09-18 17:24:22 +02:00
Volker Lendecke
d68ed1b9c6 s3: Make sharesec optionally use sddl 2011-09-16 00:08:42 +02:00
Stefan Metzmacher
3f00cce9b3 s3:libsmb: pass max_protocol to cli_negprot()
metze
2011-09-15 10:25:17 +02:00
Jeremy Allison
cc6f0231c9 Finish commit 8745c70d by Michael Adam.
If you're going to move winbindd_cache.tdb to the state_path, do it *everywhere*.

Found by Ira Cooper <ira@wakeful.net>.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 15 00:43:04 CEST 2011 on sn-devel-104
2011-09-15 00:43:04 +02:00
Stefan Metzmacher
15179852ea s3:net_time: make use of cli_state_server_time_zone() and cli_state_server_time()
metze
2011-09-13 21:53:08 +02:00
Stefan Metzmacher
3e227d8544 s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep  8 10:21:50 CEST 2011 on sn-devel-104
2011-09-08 10:21:50 +02:00
Vicentiu Ciorbaru
3fc2bc34a5 s3-net: Added documentation for net_rpc_conf functions
Added comments to most functions of net rpc conf for easier
understanding of the code.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Aug 22 17:08:15 CEST 2011 on sn-devel-104
2011-08-22 17:08:15 +02:00
Vicentiu Ciorbaru
57b7fb7256 s3-net: Implemented net rpc conf import command
The function takes a local file in smb.conf format,
uses calls to smbconf to create smbconf_service structs,
which are then placed in the remote registry.

The function also provides a test module to only print
the changes that it would make.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:28 +02:00
Vicentiu Ciorbaru
a00851f337 s3-net: Added net rpc conf import command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:28 +02:00
Vicentiu Ciorbaru
66583da28d s3-net: Implemented net rpc conf addshare command
The function is mostly a wrapper around a series of setparm
commands. It can be used to quickly set up a share with simple
parameters.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:28 +02:00
Vicentiu Ciorbaru
16b463739b s3-net: Added net rpc conf addshare command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:28 +02:00
Vicentiu Ciorbaru
7ee8a492c6 s3-net: Implemented net rpc conf setincludes command
The function creates the share key if it does not exist.
If the share key was present it deletes the previous includes.
After this the function sets the new includes accordingly.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:28 +02:00
Vicentiu Ciorbaru
f9862971c1 s3-net: Added net rpc conf setincludes command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
0c7f1d32e8 s3-net: Implemented net rpc conf setparm command
The function creates the share key if it does not exist.
If the share key was present it deletes the previous value.
After this the function sets the new value accordingly.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
ffe98b51ef s3-net: Added net rpc conf setparm command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
1a3b88cfb3 s3-net: Implemented net rpc conf delparm command
The function makes use of existing code from delincludes.
It has the same logic, except it uses the second argument
passed to determine which value to delete from the registry.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
689edf8ae1 s3-net: Added net rpc conf delparm command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
f370965c34 s3-net: Refactored part of rpc_conf_delincludes_internal
The function now makes use of rpc_conf_del_value to delete
the includes of a given share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
4b3e2adf8c s3-net: Created function net_rpc_conf_del_value
Function is used to refactor some of the code used in
delincludes and also to be used in the other key manipulating
functions.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:27 +02:00
Vicentiu Ciorbaru
704d7d02ac s3-net: Implemented net rpc conf delincludes command
The function openes the key attached to the service passed as a
parameter to the command and it uses dcerpc_winreg_DeleteValue to
delete the includes value if it exists

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
a974f01b6b s3-net: Added net rpc conf delincludes command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
8d335a3ad8 s3-net: Implemented net rpc conf getincludes command
The function creates a smconf_service struct that holds the share
passed as the first argument to the command and searches in it for
"include" parameters. If any are found, they are displayed.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
b52bfc1a9a s3-net: Added net rpc conf getincludes command to net rpc conf
The function only appears in the commands list usage of net rpc
conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
5a36306704 s3-net: Implemented net rpc conf getparm command
The function creates a smconf_service struct that holds the share
passed as the first argument to the command and searches in it for
the parameter passed as the second argument to the command

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
8e2ee72bcd s3-net: Added net rpc conf getparm command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
7de814c5a7 s3-net: Implemented net rpc conf delshare command
The function makes use of dcerpc_winreg_delete_subkeys_recursive
to clear the share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:26 +02:00
Vicentiu Ciorbaru
4728cf66c5 s3-net: Added net rpc conf delshare command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
f94c8e366f s3-net: Implemented net rpc conf drop command
The function makes use of dcerpc_winreg_delete_subkeys_recursive
to clear the configuration.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
01e80f81d8 s3-net: Added net rpc conf drop command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
5f8ec78768 s3-net: Implemented net rpc conf showshare command
The function has the same logic as net rpc conf list, however it
only loads the specific share.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
2db3696303 s3-net: Added net rpc conf showshare command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
ed0c5f54aa s3-net: Implemented net rpc conf listshares command.
The function prints the names of the remote shares found, one per line.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:25 +02:00
Vicentiu Ciorbaru
1ca6e99141 s3-net: Added net rpc conf listshares command to net rpc conf
The function only appears in the commands list usage of net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
8efd30ca61 s3-net: rpc_conf_list now uses the wrapper rpc_conf_open_conf
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
f16d092ad9 s3-net: Added rpc_conf_open_conf function
The function is used as a wrapper to open the HKLM hive key and
the smbconf key.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
08be91b011 s3-net: Added the net rpc conf list command.
The command make use of the smbconf_service struct,
via the function rpc_conf_get_share(). This allows for
further expansion with the use of smbconf.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
283da12a73 s3-net: Added the command rpc conf to the net binary.
The net binary now has an extra item linked to it, the
net_rpc_conf.c module.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
b46655bd18 s3-net: Fixed whitespace errors
Fixed previously existing whitespace errors in net_rpc.c

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Andreas Schneider
61ada700a6 s3-id_cache: Use better names for id cache management ops
The IDMAP term is normally associated with Winbind's idmap stuff.
These functions deal with id caching not id mapping.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Amitay Isaacs
4201d6fd68 s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:56 +10:00
Vicentiu Ciorbaru
db153f96d2 s3-net: Fixed a small typo in net conf function table
The description of the function net conf delincludes had a wrong
usage message: "net conf setincludes" instead of "net conf delincludes".

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-08 18:02:36 +02:00
Vicentiu Ciorbaru
43f3d6ad33 s3-net: Fixed typo in net conf
There was a missing ']' in net conf addshare usage message.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Aug  8 16:44:08 CEST 2011 on sn-devel-104
2011-08-08 16:44:08 +02:00
Andrew Bartlett
da4345a8d1 s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hash
The session key we want here (the only one that is availble to the
encryption layer) is the one obtained by cli_get_session_key(), as
NTLMSSP creates a per-session session key via key exchange and NTLMv2
negotiation.

The key was never directly the NT hash anyway (this is simply a
mistake, the extra MD4() was lost during my previous cleanup
f28f113d8e in 2008), but was MD4(NT
hash) in early implementations of NTLMSSP.

However, regardless this call is not available on domain trusts
between AD domains and Windows 2003 R2, making this less useful.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andrew Bartlett
778bf87d8d s3-ntlmssp Remove calls to auth_ntlmssp_and_flags from the server
This is changed so that the callers ask for the additional flags
that they need, starting with no additional flags.

This helps to create a proper abstraction layer in
ntlmssp_wrap/auth_ntlmssp.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Stefan Metzmacher
ed6b8deea7 s3:net_rpc: make use of cli_state_protocol()
metze
2011-08-02 04:54:29 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Michael Adam
b793e02c6b s3:smbstatus: use lp_load_global() - smbstatus does not need to load shares! 2011-07-28 11:17:42 +02:00
Michael Adam
7c41dda1b3 s3:split_tokens: use lp_load_global(), fixing the call to lp_load()
this does not need share and it dos not need to save defaults
2011-07-28 11:17:41 +02:00
Michael Adam
d696beefb1 s3:split_tokens: fix a nonempty blank line 2011-07-28 11:17:41 +02:00
Michael Adam
d29be7d263 s3: use lp_load_global() in smbw_sample -- whatever this is ... :-) 2011-07-28 11:17:40 +02:00
Michael Adam
b9fdfbad2e s3:smbtree: use lp_load_global() 2011-07-28 11:17:40 +02:00
Michael Adam
7e2deb94dc s3:smbpasswd: use lp_load_global() 2011-07-28 11:17:40 +02:00
Michael Adam
039ae12dbb s3:smbfilter: use lp_load_global() 2011-07-28 11:17:39 +02:00
Michael Adam
e6176d597a s3:smbcquotas: use lp_load_global() 2011-07-28 11:17:39 +02:00
Michael Adam
ce8beb5133 s3:smbcontrol: use lp_load_global(): smbcontrol does not need to load the shares 2011-07-28 11:17:38 +02:00
Michael Adam
b608cfc8ec s3:smbcacls: use lp_load_global() 2011-07-28 11:17:38 +02:00
Michael Adam
d4abfcc04b s3:pdbedit: use lp_load_global() 2011-07-28 11:17:38 +02:00
Michael Adam
2a98ee0f83 s3:ntlm_auth: use lp_load_global() 2011-07-28 11:17:37 +02:00
Michael Adam
ac9a61bda8 s3:nmblookup: use lp_load_global() 2011-07-28 11:17:37 +02:00
Michael Adam
82202f99b3 s3:net: use lp_load_global() 2011-07-28 11:17:36 +02:00
Michael Adam
7557ba1eb2 s3:eventlogadm: use lp_load_global() 2011-07-28 11:17:36 +02:00
Michael Adam
1679fe5ca9 s3:dbwrap_torture: use lp_load_global() 2011-07-28 11:17:35 +02:00
Michael Adam
59a2f3d707 s3:dbwrap_tool: use lp_load_global() 2011-07-28 11:17:35 +02:00
Björn Baumbach
d409c0b97b s3-utils/net_rpc_printer.c: fix error message
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 24 19:01:47 CEST 2011 on sn-devel-104
2011-07-24 19:01:47 +02:00
Björn Baumbach
7302277e43 s3-utils/net_rpc.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:12 +02:00
Björn Baumbach
c436a7d812 s3-utils/net_rpc_printer.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:07 +02:00
Björn Baumbach
eacd555f70 s3-utils/smbcacls.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:02 +02:00
Björn Baumbach
768646c9a2 s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
Will introduce new cli_query_secdesc() function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
ebc53c3575 s3-utils/net_rpc_printer.c: print more info on write error
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:54 +02:00
Björn Baumbach
fd7631c633 s3-utils/net_rpc_printer.c: return on read error in net_copy_file()
replace cli_read_old() with cli_read()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:46 +02:00
Stefan Metzmacher
e0a38c3a36 s3:net_util: use server_name instead of cli->desthost
They should be the same.

metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
4fb03b4edd s3:net_rpc_registry: use pipe_hnd->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
1f1ca59a04 s3:net_rpc_printer: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
419eb293f7 s3:net_rpc_join: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
7ca20eadf4 s3:net_rpc_join: use pipe_hnd->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
27c38dfb44 s3:net_rpc: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
f88723ab27 s3:net_rpc: use netr->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
3d675f1219 s3:net_rap: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
cc4b2a6dc3 s3:net_rpc_printer: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
9b40092cbd s3:net_rpc: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
a46b265563 s3:net_rpc_join: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
f0c1b5dad2 s3:net_rpc_join: pass const sockaddr_storage to net_rpc_join_ok()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
e91797689b s3:net_util: pass const sockaddr_storage to net_make_ipc_connection_ex()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
f7cd20d43c s3:net_util: add some const to sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
552164c7bc s3:smbcquotas: pass down NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
d60a1b4bb0 s3:smbcacls: pass down NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
6cc61d6341 s3:net_time: expect const sockaddr_storage in cli_servertime()
We don't want to modify the value.

metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
5bd80b20a1 s3:smbtree: try to fix completely broken logic in get_workgroups()
metze
2011-07-22 17:06:07 +02:00
Christian Ambach
410c4deefe s3:utils fix a compiler warning
fix a compiler warning about missing prototypes
2011-07-21 14:57:10 +02:00
Christian Ambach
9779af85d6 s3:utils/net_afs fix compiler warnings 2011-07-21 14:55:01 +02:00
Christian Ambach
3b231e6a12 s3:lib/afs fix the build with --with-fake-kaserver
This fixes one piece of Bug #8263
2011-07-21 14:51:28 +02:00
Björn Baumbach
9b168e128a s3-libsmb: replace cli_read() with cli_read_old()
Will introduce new cli_read() function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Günther Deschner
3af3e4843f lsa: rename auth info argument in lsa_CreateTrustedDomainEx2
Guenther
2011-07-15 17:55:20 +02:00
Volker Lendecke
70da27838b s3: Avoid leaking http_timestring in print_registry_key
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jul 15 09:44:05 CEST 2011 on sn-devel-104
2011-07-15 09:44:05 +02:00
Andrew Bartlett
fad3c763f7 s3-param Remove lp_set_passdb_backend() 2011-07-08 11:23:23 +02:00
Stefan Metzmacher
9a350ca3b6 s3:utils: avoid cli_nt_error()/cli_errstr() if we already have the status
metze
2011-07-07 19:16:27 +02:00
Günther Deschner
cfc3b6e5f7 s3-printing: make sure to first migrate the printers then the security descriptor.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:02 +02:00
Günther Deschner
57bbb32c64 s3-printing: remove spoolss pipe from migration library, only using winreg finally.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:02 +02:00
Gregor Beck
cd83c1d958 s3:testparm: avoid spurious warnings about dos mode mapping and create mask if store dos attributes is set
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jul  7 12:49:01 CEST 2011 on sn-devel-104
2011-07-07 12:49:00 +02:00
Volker Lendecke
26782fbbf3 s3: make cli_resolve_path return NTSTATUS
This looks larger than it is. No parameters needed changing.
2011-07-06 08:35:27 +02:00
Günther Deschner
ff94539f27 s3-printing: open up a winreg pipe handle for the migration code.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Jul  4 15:06:41 CEST 2011 on sn-devel-104
2011-07-04 15:06:41 +02: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
Günther Deschner
bafd7212eb s3-net: use printing_migrate library, and eliminate duplicate code.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jul  1 17:57:09 CEST 2011 on sn-devel-104
2011-07-01 17:57:09 +02:00
David Disseldorp
a36ce0735f s3-printing: fill devicemode size in migrate_printer()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-06-30 09:40:50 +02: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
4d2c56c4b1 s3-net: Bind our gettext results to 'unix charset'
This ensures that the translations and any embedded strings are in the
same charset.  It won't be the one from the user's locale (we no
longer auto-detect that), but it will be self-consistent.

Thanks to Steve Langasek for pointing this function out!

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Rusty Russell
d925b327f4 tdb_compat: Higher level API fixes.
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
3a8faefd66 tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
Note that tdb_nextkey_compat frees the old key for us.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
5a7874e119 tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for < 0 instead of == -1.

Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Stefan Metzmacher
5d736d8777 s3:utils/net_*registry: use c99 initializers which are supported by old gcc 2.95 compilers (bug #8226)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jun 15 03:48:41 CEST 2011 on sn-devel-104
2011-06-15 03:48:41 +02:00
Christian Ambach
7639684f27 s3-utils: fix crash in net cache get
free the blob correctly

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue Jun 14 12:01:59 CEST 2011 on sn-devel-104
2011-06-14 12:01:59 +02:00
Michael Adam
730ea92208 s3:net conf addshare: do not stat-check the share path.
Allow paths with % macros and paths that do not (yet...) exist.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jun 10 17:38:07 CEST 2011 on sn-devel-104
2011-06-10 17:38:07 +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
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
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
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Volker Lendecke
10f5fa8a1e s3: Make use of name_resolve_bcast in nmblookup 2011-06-05 14:08:01 +02:00
Jeremy Allison
c06a31dd65 Fix const warnings.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jun  2 01:02:53 CEST 2011 on sn-devel-104
2011-06-02 01:02:53 +02:00
Jeremy Allison
cbfe8029a4 Fix const warning. 2011-06-01 23:53:07 +02:00
Jeremy Allison
24ce9d52a6 Fix const warning. 2011-06-01 23:53:07 +02:00
Günther Deschner
f103e0c39f s3: fix more -Wunused-but-set-variable build warnings.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jun  1 00:29:30 CEST 2011 on sn-devel-104
2011-06-01 00:29:30 +02:00
Günther Deschner
4ac4ad2108 s3-utils: fix another -Wunused-but-set-variable build warning.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue May 31 05:18:42 CEST 2011 on sn-devel-104
2011-05-31 05:18:42 +02:00
Sumit Bose
e10f27d575 Improve documentation for net rpc trust
Add man pages entries and fix usage output.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May 30 20:05:34 CEST 2011 on sn-devel-104
2011-05-30 20:05:34 +02:00
Gregor Beck
723ba6024c s3:net: registry export: close key after recursion returns
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon May 30 18:53:28 CEST 2011 on sn-devel-104
2011-05-30 18:53:28 +02:00
Michael Adam
0d746f653e s3:net registry: polish output of net registry enumerate[_recursive]
so that net registry enumerate output is as before, and
net registry enumerate_recursive is formatted more nicely
2011-05-30 17:42:27 +02:00
Gregor Beck
5ec479fa0c s3:net: registry: use recursive implementation for enumerate
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Gregor Beck
22011ddc9e s3:net: registry: add new command enumerate_recursive
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Gregor Beck
c967e8fae5 s3:smbcacls: fix parsing of multiple flags
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Volker Lendecke
797316ae97 s3: Use cli_connect_nb in net_rpc_check
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104
2011-05-28 21:57:04 +02:00
Volker Lendecke
54970f90f6 s3: Use cli_connect_nb in cli_servertime 2011-05-28 20:50:10 +02:00
Andrew Bartlett
ee0ee5e925 s3-testparm Warn about incorrect use of 'password server'
This merges master with v3-6-test

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May 25 05:20:57 CEST 2011 on sn-devel-104
2011-05-25 05:20:57 +02:00
Stefan Metzmacher
1e472f1534 s3:testparm: don't return an error for a warning message
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 20 13:14:39 CEST 2011 on sn-devel-104
2011-05-20 13:14:38 +02:00
Andrew Bartlett
06435acf3b s3-testparm Warn more on incorrect use of 'password server' 2011-05-18 16:12:08 +02:00
Andrew Bartlett
3c8de7dd66 lib/util/charset Don't allow invalid 'dos charset = utf8'
No DOS client used UTF8, and this creates subtle, difficult to
disagnose breakage of schannel (domain membership).

Andrew Bartlett
2011-05-18 16:12:08 +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
Björn Baumbach
25f1583b9f s3-net_rpc_printer.c: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-05-18 10:53:45 +02:00
Günther Deschner
3d100216b8 s3-net: fix potential crash bug in display_print_driver3().
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri May 13 18:49:06 CEST 2011 on sn-devel-104
2011-05-13 18:49:06 +02:00
Andreas Schneider
4d391d29f8 libsmbconf: Convert smbconf_get_config() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:22 +02:00
Andreas Schneider
e1f0b91c5f libsmbconf: Convert smbconf_transaction_*() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:22 +02:00
Andreas Schneider
72d15f0c03 libsmbconf: Convert smbconf_delete_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:22 +02:00
Andreas Schneider
d911bafea6 libsmbconf: Convert smbconf_set_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:22 +02:00
Andreas Schneider
9f9711490a libsmbconf: Convert smbconf_get_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-10 19:13:21 +02:00