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

21572 Commits

Author SHA1 Message Date
Günther Deschner
cf6e59de2b Fix some error strings in netdomjoin-gui.
Guenther
(This used to be commit aaea8f1ed7)
2008-01-04 11:55:08 +01:00
Günther Deschner
8dc1bf89a7 Robustness fix for libnet join when unjoining.
Guenther
(This used to be commit d7f01d940f)
2008-01-04 11:55:00 +01:00
Steve French
8122eb767a Update mount.cifs help
Steve
(This used to be commit b9d2da4d10)
2008-01-03 17:13:38 -06:00
Günther Deschner
b076a7e802 Add ads_get_joinable_ous().
Guenther
(This used to be commit 5bbceac881)
2008-01-03 18:15:59 +01:00
Günther Deschner
192700bd08 Use different error code for libnet_conf initialization failure.
Guenther
(This used to be commit 65537eae84)
2008-01-03 18:15:28 +01:00
Günther Deschner
be88a67388 Minor libnetapi join cosmetic cleanup.
Guenther
(This used to be commit 4deef80bed)
2008-01-03 18:15:22 +01:00
Günther Deschner
f8dacb9860 Add some more join related werror codes.
Guenther
(This used to be commit 62e7d467ab)
2008-01-03 18:15:14 +01:00
Michael Adam
5470f8f638 Make libnet_conf handle opening/initialization of the registry.
Open state is currently tracked by a global variable
to avoid double initialization.

Later, this can possibly be replaced by a conf-context
created by an initialization function and passed around
to the other api functions.

Michael
(This used to be commit 77713e7764)
2008-01-03 15:33:09 +01:00
Michael Adam
6dce6ba0a6 Add a comment header and do some slight reformatting.
Michael
(This used to be commit 5d557e3f95)
2008-01-03 14:34:31 +01:00
Michael Adam
30829d1bda Use GLOBAL_NAME constant.
Michael
(This used to be commit 4c404d627c)
2008-01-03 14:17:49 +01:00
Michael Adam
5655ae7a24 Rename libnet_smbconf_set_global_param() to libnet_conf_set_global_parameter().
Now all functions are converted to the consistent naming scheme.

Michael
(This used to be commit a559533c0c)
2008-01-03 14:17:49 +01:00
Michael Adam
2476254ccd Rename libnet_smbconf_delparm() to libnet_conf_delete_parameter().
Michael
(This used to be commit 073eeca51e)
2008-01-03 14:17:49 +01:00
Michael Adam
55771b356d Rename libnet_smbconf_getparm() to libnet_conf_get_parameter().
Michael
(This used to be commit d08556dbc7)
2008-01-03 14:17:49 +01:00
Michael Adam
b9f904b59d Rename libnet_smbconf_setparm() to libnet_conf_set_parameter().
Michael
(This used to be commit e00cb415d3)
2008-01-03 14:17:49 +01:00
Michael Adam
e89411effd Rename libnet_smbconf_delshare() to libnet_conf_delete_share().
Michael
(This used to be commit 2075baf551)
2008-01-03 14:17:49 +01:00
Michael Adam
e1aa474a32 Rename libnet_smbconf_getshare() to libnet_conf_get_share().
Michael
(This used to be commit 1575612f19)
2008-01-03 14:17:49 +01:00
Michael Adam
3f3a29ed50 Rename libnet_smbconf_create_share() to libnet_conf_create_share().
Michael
(This used to be commit 6bc4ee2108)
2008-01-03 14:17:49 +01:00
Michael Adam
630de5f555 Rename libnet_smbconf_share_exists() to libnet_conf_share_exists().
Michael
(This used to be commit 3258758e5c)
2008-01-03 14:17:49 +01:00
Michael Adam
daf1a460c8 Rename libnet_smbconf_get_share_names() to libnet_conf_get_share_names().
Michael
(This used to be commit 2e4beee66b)
2008-01-03 14:17:49 +01:00
Michael Adam
90837d048b Rename libnet_smbconf_get_config() to libnet_conf_get_config().
Michael
(This used to be commit e8f7c07699)
2008-01-03 14:17:49 +01:00
Michael Adam
05ff62cf78 Rename libnet_smbconf_drop() to libnet_conf_drop().
Michael
(This used to be commit 42ae33a962)
2008-01-03 14:17:49 +01:00
Michael Adam
12a0cd5310 Rename libnet_smbconf_reg_get_values() to libnet_conf_reg_get_values().
Now all internal helper functions are converted to the consistent
naming scheme.

Michael
(This used to be commit c23e6636a8)
2008-01-03 14:17:49 +01:00
Michael Adam
6ab11e5f98 Rename libnet_smbconf_format_registry_value() to libnet_conf_format_registry_value().
Michael
(This used to be commit 3f9f353351)
2008-01-03 14:17:49 +01:00
Michael Adam
547c3583e4 Rename libnet_smbconf_reg_set_value() to libnet_conf_reg_set_value().
Michael
(This used to be commit 96b2923bc3)
2008-01-03 14:17:48 +01:00
Michael Adam
340cb434db Rename libnet_smbconf_reg_create_service_key() to libnet_conf_reg_create_service_key().
Michael
(This used to be commit cd1846943c)
2008-01-03 14:17:48 +01:00
Michael Adam
d3e54d913c Rename libnet_smbconf_value_exists() to libnet_conf_value_exists().
Michael
(This used to be commit 49f740797b)
2008-01-03 14:17:48 +01:00
Michael Adam
cd84256866 Rename libnet_smbconf_reg_open_basekey() to libnet_conf_reg_open_base_key().
Michael
(This used to be commit c2ba52b2c3)
2008-01-03 14:17:48 +01:00
Michael Adam
dde8701b85 Rename libnet_smbconf_reg_open_service_key() to libnet_conf_reg_open_service_key().
Michael
(This used to be commit 4d86d2dd6f)
2008-01-03 14:17:48 +01:00
Michael Adam
e598b93d2f Rename libnet_smbconf_reg_open_path() to libnet_conf_reg_open_path().
Michael
(This used to be commit 9868364e2c)
2008-01-03 14:17:48 +01:00
Michael Adam
4612391850 Rename libnet_smbconf_add_string_to_array() to libnet_conf_add_string_to_array().
This is the start of making nomenclature more consistent
(functions in libnet_conf.c should be called libnet_conf_*,
not libnet_smbconf_* ...

Michael
(This used to be commit 0dd3967bfd)
2008-01-03 14:17:48 +01:00
Michael Adam
78acbddbd5 Happy new year again.
Michael
(This used to be commit e568f42e21)
2008-01-03 14:17:48 +01:00
Günther Deschner
53e1014472 Use -g instead of -gstabs as many have reported gdb problems with -gstabs.
Guenther
(This used to be commit 8befb22672)
2008-01-03 13:41:43 +01:00
Günther Deschner
6afaafe083 Let DsGetDCName figure out whether domain_name is a flat_name when unjoining.
Guenther
(This used to be commit 75165ba4e7)
2008-01-03 13:41:36 +01:00
Günther Deschner
98ae29c26a Fix configure output for libnetapi.
Guenther
(This used to be commit d00ce6685a)
2008-01-03 13:41:27 +01:00
Günther Deschner
b0994bead7 In libnetjoin don't mix admin password with machine account pwd.
Guenther
(This used to be commit 5b2eec21c2)
2008-01-03 13:17:49 +01:00
Günther Deschner
2c072ac879 Some coding convention pedantism.
Guenther
(This used to be commit 338baf96cb)
2008-01-03 12:11:18 +01:00
Michael Adam
0240d175bf Return existsing cache_tree if it has already been initialized.
So reghook_cache_init() does not leak memory when called more
than once.
Also, fix the return value while we are at it.

Michael
(This used to be commit 25f571f40a)
2008-01-03 12:07:02 +01:00
Michael Adam
984aa7a156 Rename libnet_smbconf_reg_setvalue_internal() to libnet_smbconf_reg_set_value().
Michael
(This used to be commit 3fc3fee88a)
2008-01-03 11:35:21 +01:00
Michael Adam
e0ea759807 Fix a comment.
Michael
(This used to be commit 2d0c7fe44f)
2008-01-03 11:33:17 +01:00
Michael Adam
a750e223b3 Rename libnet_smbconf_reg_createkey_internal to libnet_smbconf_reg_create_service_key.
Michael
(This used to be commit 08056a2c81)
2008-01-03 11:32:00 +01:00
Michael Adam
fd597c7e6d Add libnet_conf API function libnet_smbconf_create_share().
And make libnet_smbconf_setparm() return error if the share
does not already exist. Adapt net_conf_addshare to this new
situation.

Michael
(This used to be commit de349bd26d)
2008-01-03 11:30:14 +01:00
Günther Deschner
40079c4eb4 Remove unused vars.
Guenther
(This used to be commit ff3f0006d1)
2008-01-03 10:49:39 +01:00
Volker Lendecke
149e86b842 Trivial simplification
... things you come across when you review code
(This used to be commit 1e006bcfb1)
2008-01-03 10:24:45 +01:00
Volker Lendecke
2242f2673c Add comments
Jeremy was able to use this correctly without comments, so the code can't be
*that* bad :-)
(This used to be commit 6f22f7c13f)
2008-01-03 10:24:11 +01:00
Jeremy Allison
cfcdeb52bf Fix for bug #5163 from Laurent Pinchart <pinchart@skynet.be>
Failure to change password in ldap is mapped to NT_STATUS_UNSUCCESSFUL unconditionally.
Jeremy.
(This used to be commit 9369d6e907)
2008-01-02 18:20:23 -08:00
Jeremy Allison
cc957c7f6d Convert the little caches in util_sock.c to use
the singleton memcache. Vl please check (passes
make valgrindtest).
Jeremy.
(This used to be commit a4d613cde8)
2008-01-02 17:37:39 -08:00
Michael Adam
ad1cc905b2 Don't leak: Use a temporary context for the admin token and free it.
Michael
(This used to be commit 9d7502115e)
2008-01-03 01:29:43 +01:00
Michael Adam
3c9f7c7a64 Use libnet_smbconf_reg_open_path() in libnet_smbconf_drop().
Replaces creation of token and direct use of reg_open_path.

Michael
(This used to be commit 7e407e18be)
2008-01-03 01:29:43 +01:00
Michael Adam
3bf57a4d82 Abstract opening of registry path out of libnet_smbconf_reg_open_service_key().
Creates new function libnet_smbconf_reg_open_path().
Use libnet_smbconf_reg_open_path() directly in libnet_smbconf_reg_open_basekey().
Return error in libnet_smbconf_reg_open_service_key() when NULL
servicename is given.

Michael
(This used to be commit 1e46b47963)
2008-01-03 01:29:43 +01:00
Michael Adam
f9bb8a345e Add debug output in error path.
Michael
(This used to be commit a58ccbc6d7)
2008-01-03 01:29:43 +01:00
Michael Adam
b344dafa62 Fix setting of error code in error path.
Michael
(This used to be commit 8a7954a9ae)
2008-01-03 01:29:43 +01:00
Michael Adam
a6fb71e55b Use a better parameter name.
Michael
(This used to be commit 3972deb90c)
2008-01-03 01:29:43 +01:00
Michael Adam
c995a63371 Rename libnet_smbconf_reg_open_path() to libnet_smbconf_reg_open_service_key().
Michael
(This used to be commit d95b4935d3)
2008-01-03 01:29:43 +01:00
Michael Adam
d191bb126b Hey, it is 2008 now.
:-)

Michael
(This used to be commit a1d3f60ea7)
2008-01-03 01:29:43 +01:00
Michael Adam
102fda5c29 Choose a more apropriate parameter name.
Michael
(This used to be commit 39a73b6291)
2008-01-03 01:29:43 +01:00
Michael Adam
83d74c10a2 Rename libnet_smbconf_reg_open_basepath() to libnet_smbconf_reg_open_basekey().
Michael
(This used to be commit 9e953a94e9)
2008-01-03 01:29:43 +01:00
Gerald (Jerry) Carter
0df7bcaec3 Fix some C++ warnings (patch was Volker's) - implicit case from void* to char*
(This used to be commit 518168410c)
2008-01-02 17:34:41 -06:00
Gerald (Jerry) Carter
59f5b4c9d7 Merge branch 'work/v3-2-test' into v3-2-test
(This used to be commit 761858312b)
2008-01-02 17:15:10 -06:00
Gerald (Jerry) Carter
23b3b7c2b3 use C99 bool return types (true & false).
(This used to be commit f22c9d6296)
2008-01-02 14:54:25 -06:00
Gerald (Jerry) Carter
701a56a698 Make sure that wbcLookupSid() and wbcLookupRids() use talloc()'d memory.
Follows existing convention that all returned memory should be freed with
wbcFreeMemory() and not directly with free().  Noticed by Volker.  Txs.
(This used to be commit 39c2059f66)
2008-01-02 14:50:59 -06:00
Jeremy Allison
0090ec236d Attempt to fix bug #3617. Mix of patches from Volker and
myself. Use standard dlinklist macros.
Jeremy.
(This used to be commit 1b06ee69f6)
2008-01-02 11:56:07 -08:00
Michael Adam
a5d2449fe1 Use the proper boolean constants.
Michael
(This used to be commit f731fee408)
2008-01-02 17:08:28 +01:00
Günther Deschner
4656265a23 Fix libnetapi (resolve dependency on libwbclient).
Guenther
(This used to be commit fa669b307c)
2008-01-02 13:52:23 +01:00
Günther Deschner
0195afeed7 Fix libsmbclient (resolve dependency on libwbclient).
Guenther
(This used to be commit ef17dc7bda)
2008-01-02 13:52:23 +01:00
Günther Deschner
866b5291b6 Make libsmbsharemodes.so work again (fix unresolved tdb symbols).
Guenther
(This used to be commit 3c6ed03216)
2008-01-02 13:52:23 +01:00
Volker Lendecke
523dbf801b Convert call_trans2open to create_file()
(This used to be commit 22138572bd)
2008-01-02 13:32:29 +01:00
Volker Lendecke
8ad3db1d2b Convert reply_mknew to create_file
(This used to be commit 1b1cea9ef0)
2008-01-02 13:32:23 +01:00
Volker Lendecke
cc322c708c Convert reply_open_and_X to create_file
(This used to be commit fa09b9ab26)
2008-01-02 13:32:12 +01:00
Volker Lendecke
c132824265 Convert reply_open to create_file
(This used to be commit 209c696ab8)
2008-01-02 13:32:07 +01:00
Günther Deschner
4484339174 Add test_shlibs to Makefile.
Guenther
(This used to be commit 5f5051911c)
2008-01-02 13:25:25 +01:00
Günther Deschner
9b5ec6ba03 Happy new year !
Guenther
(This used to be commit 9a58cd5795)
2008-01-02 12:56:24 +01:00
Volker Lendecke
31d3f5726a Use NULL instead of 0
"struct security_descriptor" has pointers, not integers inside
(This used to be commit 13158014e3)
2008-01-01 13:13:31 +01:00
Michael Adam
8598bbbcb1 Make the last two helper functions in libnet_conf.c static.
Now the registry backend is completely hidden from the API.

Michael
(This used to be commit 5608c398ad)
2007-12-31 03:57:45 +01:00
Michael Adam
4c7ef1c03e Make grouping in if statement more explicit.
Michael
(This used to be commit a1bb47695a)
2007-12-31 03:55:22 +01:00
Michael Adam
feb4d82724 Fix a permissions error in reg_deletekey_recursive().
Michael
(This used to be commit 4a56d3d707)
2007-12-31 03:25:54 +01:00
Jeremy Allison
06f80cf8be We may use 127k read/write for encrypted connections.
Jeremy.
(This used to be commit 656c9d0844)
2007-12-30 18:05:33 -08:00
Michael Adam
8d9fb62a45 Change net_conf_import() to only use libnet_conf API functions.
More precisely, only import_process_service() is changed.
This removes all references to registry code from net_conf.c.

net_conf_import() is currently -- like net_conf_addshare() -- also
considered a high-level add-on, not an API function.

Michael
(This used to be commit b4dca117c0)
2007-12-31 03:02:39 +01:00
Michael Adam
01f8fd55a7 Rewrite net_conf_addshare() to only use libnet_conf API functions.
Also exit on error if the share already exists.

net_conf_addshare() is considered a high level utility function.
It should not be an libnet_conf API function in itself since it is
kind of arbitrary.

Michael
(This used to be commit af5218f150)
2007-12-31 01:56:18 +01:00
Michael Adam
e8a680cdf3 Rename libnet_smbconf_key_exists() to libnet_smbconf_share_exists()
and move it to the api section of libnet_conf.c

Michael
(This used to be commit 9b5d8f4d95)
2007-12-31 01:14:44 +01:00
Michael Adam
a74de0c7eb Remove an unused variable.
Michael
(This used to be commit 332be113a7)
2007-12-30 22:36:02 +01:00
Michael Adam
0f2e7c7381 Remove an unused variable.
Michael
(This used to be commit 7bac935b65)
2007-12-30 22:36:01 +01:00
Michael Adam
80957726b6 Remove all d_fprintf-s from libnet_conf.c
Replacing them buy DEBUG statements and filling in
d_fprintfs in callers in net_conf.c.

Michael
(This used to be commit 1f0122d8d4)
2007-12-30 22:36:01 +01:00
Jeremy Allison
c6646f115e As the encryption is stream based there's no reason
oplock breaks can't be encrypted. If we have multiple
contexts I should probably attach them to the connection
struct, but for now use the global context number.
Jeremy.
(This used to be commit 5b4b335ed0)
2007-12-30 13:10:29 -08:00
Jeremy Allison
f04daa682a Fix error message.
Jeremy.
(This used to be commit a0494b115b)
2007-12-29 22:42:20 -08:00
Jeremy Allison
6d9b2439d2 Added -e, --encrypt option to smbclient that immediately
forces encrypted smb after initial connect. Will document
for 3.2 official release.
Jeremy.
(This used to be commit f02bf41928)
2007-12-29 22:39:52 -08:00
Jeremy Allison
bd3521457c Allow encryption context setup on IPC$.
Jeremy.
(This used to be commit 5d424cb306)
2007-12-29 22:36:49 -08:00
Michael Adam
df450fc090 Make pdb_tdb honour a private dir overridden in smb.conf.
One lp_private_dir() has to be used instead of get_dyn_PRIVATE_DIR()
to determine the location of the passdb.tdb.

I noticed this when running make test as a "normal user" from a
build, where I had done "make install" as root before, and so
the passdb.tdb could not be accessed during the startup phase
"CREATE TEST ENVIRONMENT IN ./st ..." in selftest.sh.

Michael
(This used to be commit 1f96389afa)
2007-12-29 21:38:39 -08:00
Michael Adam
d674b95357 Make libnet_smbconf_reg_open_path() static.
Michael
(This used to be commit 6447bae71c)
2007-12-30 00:32:42 +01:00
Michael Adam
1f992517ec Make libnet_smbconf_reg_open_basepath() static.
Michael
(This used to be commit 8e87dd79ba)
2007-12-30 00:32:42 +01:00
Michael Adam
59128c7837 Remove list_values() from net_conf.c - it is not needed any more.
Also make libnet.c:libnet_smbconf_format_registry_value() static.
(There are nor more external callers.)

Michael
(This used to be commit ac7baa17e8)
2007-12-30 00:32:41 +01:00
Michael Adam
9c14495944 Use libnet_smbconf_get_config() in net_conf_list().
This leaves only output logic in net_conf_list().

Michael
(This used to be commit 95d9981d59)
2007-12-30 00:32:41 +01:00
Michael Adam
fe47e2e855 Add a function libnet_smbconf_get_config() to libnet_conf.c
This gets the whole config as a set of lists (of share names
and corresponding lists of parameter names and values). The function
is an aggregate of libnet_smbconf_get_share_names() and
libnet_smbconf_getshare().

Michael
(This used to be commit 94e97a7254)
2007-12-30 00:32:41 +01:00
Michael Adam
df93c1aa57 Include libnet/libnet.h in libnet_conf.c to have prototypes available.
Michael
(This used to be commit 4842438c39)
2007-12-30 00:32:41 +01:00
Jeremy Allison
f10074e84b Use correct size value for linearize call.
Jeremy.
(This used to be commit a5df44f5b7)
2007-12-29 14:43:32 -08:00
Volker Lendecke
7cbdb48475 Remove tiny code duplication
ndr_size_security_descriptor does the same as sec_desc_size
(This used to be commit bc3bd7a8e7)
2007-12-29 23:13:26 +01:00
Volker Lendecke
7be5525792 Make [un]marshall_sec_desc use librpc/ndr
(This used to be commit 387936ec39)
2007-12-29 23:13:17 +01:00
Volker Lendecke
240391be53 Make use of [un]marshall_sec_desc
(This used to be commit 54576733d6)
2007-12-29 23:13:03 +01:00
Volker Lendecke
a59280792c Remove tiny code duplication
sid_size did the same as ndr_size_dom_sid
(This used to be commit 8aec5d09ba)
2007-12-29 23:12:51 +01:00
Volker Lendecke
99bd615a80 Fix a panic
get_root_nt_token asks for "struct nt_user_token". talloc_get_type is not smart
enough to see that this is the same as NT_USER_TOKEN... :-)
(This used to be commit 22a98bf7b8)
2007-12-29 21:42:56 +01:00
Volker Lendecke
a60867b67e Apply some const
(This used to be commit 241b72141e)
2007-12-29 17:14:25 +01:00
Michael Adam
397b4d5397 Return NULL (instead of unchanged) for no shares/parameters defined.
Michael
(This used to be commit bfe3d1462f)
2007-12-29 17:06:49 +01:00
Michael Adam
a6d6fbb73d Dont return count - 1 but count from libnet_smbconf_reg_get_values().
Michael
(This used to be commit ded60dec7d)
2007-12-29 17:02:27 +01:00
Michael Adam
e8cb7cecf2 Make sure libnet_smbconf_get_share_names() always lists "global" first.
And don't return count-1 but count.

Michael
(This used to be commit b7cb9b7823)
2007-12-29 17:00:27 +01:00
Michael Adam
0e8ca78720 Move talloc-appending a string to an array to its own helper function
libnet_smbconf_add_string_to_array().

Michael
(This used to be commit f4a4c1b26a)
2007-12-29 16:45:01 +01:00
Volker Lendecke
d38aa8d037 Fix uninitalized variables
(This used to be commit 2322fe7187)
2007-12-29 16:41:31 +01:00
Volker Lendecke
519277fcb7 Attempt to fix the AIX make test failures
For some reason AIX does not return the sender address in the AF_UNIX recvfrom.
So the faked netbios name lookup does not work with socket wrapper, nmbd can't
know where to send the reply. This patch works around this by telling smbclient
explicitly where to connect.

If there's any AIX experts listening -- how do I get the sender address from
AF_UNIX recvfrom?

Volker
(This used to be commit 8ba3b8cf7a)
2007-12-29 13:17:01 +01:00
Michael Adam
0b7aafff11 Fix a const warning.
Michael
(This used to be commit e276e48177)
2007-12-29 13:02:22 +01:00
Michael Adam
1c03f6b608 Rename libnet_smbconf_getshares() to libnet_smbconf_get_share_names().
Michael
(This used to be commit 9b3b9aa7e1)
2007-12-29 12:55:42 +01:00
Michael Adam
cf90b67d59 Add a comment header for libnet_smbconf_getshares().
Michael
(This used to be commit 7b51535f2f)
2007-12-29 12:53:19 +01:00
Michael Adam
2a642a6e2b Move functionality of net_conf_listshares() to libnet_conf.c
into new function libnet_smbconf_getshares().

Michael
(This used to be commit 306c7e4d9c)
2007-12-29 12:52:09 +01:00
Michael Adam
f8c39cbb7b Move functionality of net_conf_showshare() to libnet_conf.c
The functionality is moved to a new function libnet_smbconf_getshare().
This returns the parameters of the given share as two lists: the list
of parameter names and the list of matching (formatted) parameter values.

The retrieval and formatting is done in a new internal helper function
libnet_smbconf_reg_get_values() that is to become the replacement for
list_values() from net_conf.c once functionality of net_conf_list() has
been moved to libnet_conf, too.

Michael
(This used to be commit 198232bd52)
2007-12-29 12:32:16 +01:00
Volker Lendecke
40bf6730aa passdb.tdb is located in the private directory
Jerry, as part of d6cdbfd87 the default location of passdb.tdb has changed from
the private directory to the state directory. I think because passdb.tdb holds
the password hashes, it is reasonable to keep this next to the smbpasswd file.

Please review and potentially push.

Thanks,

Volker
(This used to be commit c9c7607c40)
2007-12-29 01:01:47 -08:00
Michael Adam
8093a75d6f Make the main net_conf functions static in net_conf.c
Michael
(This used to be commit dd6e09a65e)
2007-12-29 02:27:20 +01:00
Michael Adam
27f0130434 Add a couple of comment headers to the main libnet_conf functions.
Michael
(This used to be commit e9694ae20e)
2007-12-29 02:26:33 +01:00
Michael Adam
b5b51b530f Add a comment header for libnet_smbconf_format_registry_value().
Michael
(This used to be commit 80e73407ea)
2007-12-29 02:18:44 +01:00
Michael Adam
618b0efbbc Handle NULL talloc context in libnet_smbconf_format_registry_value().
Maybe we should generate a new context instead of returning NULL?

Michael
(This used to be commit d7aaec713e)
2007-12-29 02:16:38 +01:00
Michael Adam
eb356fbafc Hide the registry backend from libnet_smbconf_getparm().
Return a formatted string of the value instead.

Michael
(This used to be commit 7d0ec5bae1)
2007-12-29 02:12:33 +01:00
Michael Adam
4b75bc63bb Rename format_value() to libnet_smbconf_format_registry_value().
Michael
(This used to be commit 95d5dd9bb0)
2007-12-29 01:17:39 +01:00
Michael Adam
dfa8d9356c Move format_value() to libnet_conf.c.
Michael
(This used to be commit 3422a5048a)
2007-12-29 00:05:58 +01:00
Volker Lendecke
245537f9bd Convert get_root_nt_token to memcache
(This used to be commit fada689893)
2007-12-28 17:24:39 +01:00
Volker Lendecke
d826fcf6df Remove a global
(This used to be commit 515f6a8cff)
2007-12-28 17:16:35 +01:00
Volker Lendecke
3ba59d4616 don't store cache_readonly in gencache
tdb won't allow us to write anyway
(This used to be commit 069cd6d63a)
2007-12-28 17:09:57 +01:00
Volker Lendecke
533d6f617e Remove static zeros
(This used to be commit dbcc213710)
2007-12-28 17:02:34 +01:00
Volker Lendecke
4cdce5b50e Remove a static array
This might be worth it, mangle_hash is hardly used these days
(This used to be commit 44775ea38b)
2007-12-28 17:02:07 +01:00
Volker Lendecke
3c99b7773e Convert csamuser to memcache
(This used to be commit 476d3abf9c)
2007-12-28 13:13:29 +01:00
Volker Lendecke
c2b5cf58f5 bin/vlp needs a dependency on @LIBWBCLIENT_SHARED@
This failed to link if you compile with -j.
(This used to be commit fed8f2abd7)
2007-12-28 11:57:18 +01:00
Karolin Seeger
9dfde0ebec Improve error messages of 'net rpc user [add|delete]' commands.
Karolin
(This used to be commit 4260c79bf7)
2007-12-28 09:44:40 +01:00
Jeremy Allison
38369ba741 Ensure we turn off POSIX large read/write if encryption
is mandatory or signing is on.
Jeremy.
(This used to be commit 5088b70479)
2007-12-28 00:02:13 -08:00
Jeremy Allison
afce2b245a Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa577)
2007-12-27 23:51:03 -08:00
Volker Lendecke
33f01360e0 Fix setting the initial permission bits
This fixes a make test failure on Solaris. When creating a new file,
file_set_dosmode() called from open_file_ntcreate calculates a new permission
mask, very likely different from what had been calculated in
open_file_ntcreate. Further down we overwrote the newly calculated value with
SMB_FCHMOD_ACL, ignoring what file_set_dosmode had calculated.

Why did Linux not see this? fchmod_acl on a newly created file without acls
would not retrieve an acl at all, whereas under Solaris acl(2) returns
something even for files with just posix permissions returns something.

Jeremy, given that we have very similar code in 3.0.28 this might also explain
some of the bug reports that people have concerning ACLs on new files.

Volker

P.S: This one took a while to find...
(This used to be commit 2135dfe91b)
2007-12-28 08:52:29 +01:00
Jeremy Allison
675f41dc14 Add "smb encrypt" parameter. Can be set to "no, yes, required".
Currently if set required this is not enforced. I'll be adding
that soon.
Jeremy.
(This used to be commit df7e447623)
2007-12-27 16:54:07 -08:00
Volker Lendecke
94ee39c23f Fix the non-gcc branch of "likely"
(This used to be commit 1e07368b5f)
2007-12-28 00:12:14 +01:00
Volker Lendecke
e9b8eb1446 Remove a silly static
(This used to be commit ef75dcc9ff)
2007-12-27 22:33:02 +01:00
Volker Lendecke
bd7fc51f2d Fix the build
(This used to be commit 7fb858b350)
2007-12-27 22:32:36 +01:00
Volker Lendecke
ee8212472d Wrap the DEBUG checks in a "unlikely"
On my Laptop with some limited netbench runs this gains about 1.5% of
performance. When looking at the assembler output I would suspect the biggest
gain is by the fact that with this in place the calls to the debug functions is
moved to the function end, out of the way of the normal code paths. valgrind
tests pending I would suspect this to be much more cache friendly.

Comments?

Volker
(This used to be commit 51448a9dca)
2007-12-27 20:19:17 +01:00
Jeremy Allison
5413ad4aca Add CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP capability to
our reported caps.
Jeremy.
(This used to be commit e86d027823)
2007-12-27 10:18:22 -08:00
Jeremy Allison
3a52874815 Encryption works better when you add the client decrypt code :-).
Jeremy.
(This used to be commit d67b263406)
2007-12-26 17:17:36 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Volker Lendecke
23c965d947 typos
(This used to be commit 30fa3477c8)
2007-12-27 00:22:07 +01:00
Volker Lendecke
07867ec373 Fix some memleaks
(This used to be commit 78b0b66cba)
2007-12-26 23:45:10 +01:00
Volker Lendecke
e70c97ef85 Remove the sampwent interface
(This used to be commit 9e80b969fb)
2007-12-26 18:57:15 +01:00
Volker Lendecke
c90f731ef2 Convert pdbedit to use pdb_search_users
(This used to be commit 8a8f2583b8)
2007-12-26 18:57:15 +01:00
Volker Lendecke
5f196fafd3 Properly destroy the pdb search object
(This used to be commit 514cf53224)
2007-12-26 18:57:14 +01:00
Volker Lendecke
f633d348d7 smbpasswd_search_users
(This used to be commit 84af4fb656)
2007-12-26 18:57:14 +01:00
Volker Lendecke
533c7c81fe Add tdbsam_search_users
(This used to be commit 02f0b0bd39)
2007-12-26 18:57:14 +01:00
Volker Lendecke
250c57ccfb We need to return the correct atime
On systems with nanosecond atime we need to re-stat after messing with the fd,
at least Solaris 10 updates atime after we stat(2)ed the file.
(This used to be commit 6e6ec0a563)
2007-12-26 14:55:57 +01:00
Michael Adam
f99af84e6a Move libnet_smbconf_reg_open_basepath() in source file
to group helper functions more logically.

Michael
(This used to be commit 3fa3891f87)
2007-12-26 01:03:28 +01:00
Michael Adam
afca308742 Rename libnet_smbconf_open_basepath() to libnet_smbconf_reg_open_basepath().
Michael
(This used to be commit 4c0e7270c4)
2007-12-26 01:01:14 +01:00
Michael Adam
18ea20e19b Rename libnet_smbconf_open_path() to libnet_smbconf_reg_open_path().
Michael
(This used to be commit 4b0e636965)
2007-12-26 00:58:11 +01:00
Michael Adam
e8cfbb0f4c Rename libnet_smbconf_open_path_q() to libnet_smbconf_open_path()
removing previouse libnet_smbconf_open_path() and adding
DEBUG output (instead of d_fprintf error output) to new
libnet_smbconf_open_path().

Michael
(This used to be commit e63cc54fab)
2007-12-26 00:53:19 +01:00
Volker Lendecke
8b88fa53b5 Host SerNet-AIX has __ss_family instead of ss_family in sockaddr_storage
(This used to be commit e33286f4a6)
2007-12-25 18:37:42 +01:00
Volker Lendecke
fae533d359 AIX iface test needs rep_vasprintf
(This used to be commit 3e5788cc96)
2007-12-25 18:36:49 +01:00
Volker Lendecke
199ecd9a85 ifreq needs more from lib/replace
(This used to be commit e85290550a)
2007-12-25 14:19:50 +01:00
Volker Lendecke
afec8b523a Next try to fix get_interfaces detection
(This used to be commit 2dc0282f24)
2007-12-25 13:49:17 +01:00
Volker Lendecke
ec54edd9eb make clean should remove everything in bin/
Jerry, you might want to review/change removing libwbclient.so.0
(This used to be commit 768e043950)
2007-12-25 13:38:08 +01:00
Volker Lendecke
1c26f38c16 Interface detection should not go through the socket wrapper
Next try to get the build farm more in line again than it is now
(This used to be commit 38e178df12)
2007-12-25 12:35:44 +01:00
Volker Lendecke
b410f254f0 Revert "Attempt to fix the ifreq detection"
This reverts commit 2d08959685.
(This used to be commit acb560900b)
2007-12-25 11:59:34 +01:00
Volker Lendecke
921d8782cc Fix the build
(This used to be commit 72dc717108)
2007-12-25 11:38:26 +01:00
Michael Adam
a107e8421d Remove now unneeded talloc ctx parameter from do_JoinConfig().
Michael
(This used to be commit be985d8d0c)
2007-12-25 03:41:34 +01:00
Michael Adam
8445e820f2 Remove now unneeded talloc ctx parameter from do_join_modify_vals_config().
Michael
(This used to be commit f8823ae123)
2007-12-25 03:40:35 +01:00
Michael Adam
d25661a615 Remove now unneeded talloc ctx parameter from do_UnjoinConfig().
Michael
(This used to be commit 92b8e5ea4b)
2007-12-25 03:39:31 +01:00
Michael Adam
fc8be9d710 Remove now unneeded talloc ctx parameter from do_unjoin_modify_vals_config().
Michael
(This used to be commit 4f7375a110)
2007-12-25 03:38:06 +01:00
Michael Adam
c2ab4bd705 Add two missing free-s.
Michael
(This used to be commit 4efac39c36)
2007-12-25 03:35:00 +01:00
Michael Adam
44631bfd4d Remove talloc context parameter from libnet_smbconf_delparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_delparm.

Michael
(This used to be commit 16f1373938)
2007-12-25 03:34:04 +01:00
Michael Adam
726f32b672 Add a missing free.
Michael
(This used to be commit bf6031287f)
2007-12-25 03:29:41 +01:00
Michael Adam
f3b0469b4a Remove talloc context parameter from libnet_smbconf_setparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_setparm.

Michael
(This used to be commit efaffefc43)
2007-12-25 03:29:05 +01:00
Michael Adam
a66a5fd94b Typofix in comment.
Michael
(This used to be commit 5039a70246)
2007-12-25 03:16:25 +01:00
Michael Adam
dff8e6b62c Add comment header to function libnet_smbconf_drop().
Michael
(This used to be commit e94edb6bdb)
2007-12-25 03:08:00 +01:00
Michael Adam
efd218fb07 Remove a d_fprintf() from libnet_smbconf_drop().
Michael
(This used to be commit 078e5e98b3)
2007-12-25 03:06:48 +01:00
Michael Adam
e5a87c2543 Remove talloc context parameter from libnet_smbconf_drop().
Make use of talloc_stackframe.

Michael
(This used to be commit aaceab1153)
2007-12-25 03:05:06 +01:00
Michael Adam
2764f5a0a6 Rename drop_smbconf_internal() to libnet_smbconf_drop().
Michael
(This used to be commit 5873e6a1f8)
2007-12-25 03:01:59 +01:00
Michael Adam
8e53343a74 Move drop_smbconf_internal() to libnet_conf.c
Michael
(This used to be commit 4c2a3396bb)
2007-12-25 02:55:07 +01:00
Michael Adam
9626fffe14 Use the proper boolean constants in net_conf.c
Michael
(This used to be commit 1fe4ea63b1)
2007-12-25 02:48:45 +01:00
Michael Adam
734ddacc91 Add error reporting to net_conf_delshare().
Michael
(This used to be commit 8d02a2de61)
2007-12-25 02:42:33 +01:00
Michael Adam
86486fcc98 Simplify libnet_smbconf_delshare().
Remove talloc context parameter.
Remove d_printf error message.

Michael
(This used to be commit 870d35c048)
2007-12-25 02:37:02 +01:00
Michael Adam
9c20b9a731 Rename reg_delkey_internal() to libnet_smbconf_delshare().
Michael
(This used to be commit 7d501f0d78)
2007-12-25 02:24:39 +01:00
Michael Adam
c9f65929b7 Move reg_delkey_internal() to libnet/libnet_conf.c
Michael
(This used to be commit c1b863fd05)
2007-12-25 02:21:30 +01:00
Volker Lendecke
54861606f9 Attempt to fix the ifreq detection
(This used to be commit 2d08959685)
2007-12-25 00:13:24 +01:00
Michael Adam
3177cece65 Do not leak memory in libnet_smbconf_delparm().
Michael
(This used to be commit 49cfe2b9eb)
2007-12-24 01:03:14 +01:00
Michael Adam
713221e1c5 Do not leak memory in libnet_smbconf_setparm().
Michael
(This used to be commit a657b1c9f1)
2007-12-24 01:00:46 +01:00
Michael Adam
92b1ef15df Use the appropriate boolean constants.
Michael
(This used to be commit 45e3e2451a)
2007-12-24 00:57:04 +01:00
Michael Adam
434f0bcb02 Make libnet_smbconf_value_exists() use talloc_stackframe().
And not pass a talloc context.

Michael
(This used to be commit 2983aba9d0)
2007-12-24 00:56:24 +01:00
Michael Adam
c74579f491 Make libnet_smbconf_key_exists() use talloc_stackframe().
And not pass a talloc context.

Michael
(This used to be commit 7e8451f2f0)
2007-12-24 00:53:22 +01:00
Michael Adam
225dbe6c02 Don't leak memory in libnet_smbconf_getparm().
Michael
(This used to be commit 09e62c7654)
2007-12-24 00:47:43 +01:00
Michael Adam
44860bce54 Fix rights error in libnet_smbconf_delparm().
Introduced by additional test for existence of given parameter.

Michael
(This used to be commit 0fe095e85c)
2007-12-24 00:18:35 +01:00
Michael Adam
6306005f4c Remove redundant check of return value.
Michael
(This used to be commit 29f46c2d45)
2007-12-24 00:18:35 +01:00
Michael Adam
8f163d5c5a Move logic of net_conf_getparm() to libnet_conf.c.
Michael
(This used to be commit d3a20c4d5a)
2007-12-24 00:18:35 +01:00
Stefan Metzmacher
4e53afccb1 selftest: also export LD_LIBRARY_PATH for samba4's smbtorture
metze
(This used to be commit f5570dcf50)
2007-12-23 20:09:16 +01:00
Volker Lendecke
4c364e3078 Attempt to make the build farm run s4torture again
(This used to be commit 04710626e1)
2007-12-23 16:38:28 +01:00
Volker Lendecke
958861e13b Attempt to fix the Solaris build
Lets see what the others in the build farm think about this
(This used to be commit c2a988d842)
2007-12-23 15:53:09 +01:00
Volker Lendecke
a55a08a217 Convert the [gu]id_sid cache to memcache
(This used to be commit 4baf36784f)
2007-12-23 12:43:29 +01:00
Michael Adam
d1c2280cd4 Rename libnet_reg_createkey_internal() to libnet_smbconf_reg_createkey_internal().
Michael
(This used to be commit 0e7f215f54)
2007-12-23 04:10:32 +01:00
Michael Adam
a48f3c8a96 Make libnet_smbconf_set_global_param() call libnet_smbconf_setparm().
This not only removes duplicate logic, but also the use of
libnet_smbconf_reg_setvalue_internal() instead of do_modify_val_config()
which is removed, does add important tests and canonicalizations.

Michael
(This used to be commit fa84486649)
2007-12-23 04:10:32 +01:00
Michael Adam
b6527f3d29 Reorder libnet_conf.c some, adding "section" comments.
Michael
(This used to be commit b9f22adfd3)
2007-12-23 04:10:32 +01:00
Michael Adam
62f08d3dd9 Move net_conf_setparm() to libnet_conf.c
renaming it to libnet_smbconf_setparm()

Michael
(This used to be commit 60f49b22b5)
2007-12-23 04:10:32 +01:00
Michael Adam
31d436e54c Move reg_setvalue_internal() to libnet_conf.c
renaming it to libnet_smbconf_setvalue_internal()

Michael
(This used to be commit 7cb51a1d6d)
2007-12-23 04:10:31 +01:00
Michael Adam
88a424a4d3 Remove occurrences of registry_key from libnet_join.c
Replace duplicated logic by calls of libnet_smbconf_set_global_param()
from libnet_conf.c, pushing logic from do_JoinConfig() and do_UnjoinConfig()
to do_join_modify_vals_config() and do_unjoin_modify_vals_config()
respectively.

Only the net_conf api functions should be exported by libnet_conf.c, not
the lower level registry access functions.

Michael
(This used to be commit 81b9f1301d)
2007-12-23 04:10:31 +01:00
Michael Adam
bd2b8f0f7b Replace direct deletion of registry value by use of libnet_smbconf_delparm().
Michael
(This used to be commit 415fc0a526)
2007-12-23 04:10:31 +01:00
Michael Adam
b04708866f Move logic of net_smbconf_delparm() to libnet/libnet_conf.c
Logic in new function libnet_smbconf_delparm().

Michael
(This used to be commit 0cff79e355)
2007-12-23 04:10:31 +01:00
Michael Adam
ec3e8587ec Move smbconf_value_exists() to libnet/net_conf.c
renaming it to libnet_smbconf_value_exists().

Michael
(This used to be commit ba71c68445)
2007-12-23 04:10:31 +01:00