1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

24370 Commits

Author SHA1 Message Date
Jeremy Allison
f10074e84b Use correct size value for linearize call.
Jeremy.
(This used to be commit a5df44f5b7887d10c1e1a0b7a3dd05bcf31015e1)
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 bc3bd7a8e7c6e9e27acb195c86abb92c0f53112f)
2007-12-29 23:13:26 +01:00
Volker Lendecke
7be5525792 Make [un]marshall_sec_desc use librpc/ndr
(This used to be commit 387936ec3952f88d46df2d4943bbc4e408ad2bb5)
2007-12-29 23:13:17 +01:00
Volker Lendecke
240391be53 Make use of [un]marshall_sec_desc
(This used to be commit 54576733d6c0511dc7379f964b1cb035913b7c8d)
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 8aec5d09ba023413bd8ecbdfbc7d23904df94389)
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 22a98bf7b81fb89dce1f32ef65cfe6caaba985b3)
2007-12-29 21:42:56 +01:00
Volker Lendecke
a60867b67e Apply some const
(This used to be commit 241b72141e3d9e31e30977517f871a97d74bbf7d)
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 bfe3d1462f52d2849611fc58ad70fa08b4917077)
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 ded60dec7d75db7df485a159fb6bf628d8e24805)
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 b7cb9b78231512dc4a88c307048d7fb5334fa319)
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 f4a4c1b26a03cd0f334e00912d32f15c73474ff1)
2007-12-29 16:45:01 +01:00
Volker Lendecke
d38aa8d037 Fix uninitalized variables
(This used to be commit 2322fe718728178990fdc3696b84f5de7ae7701b)
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 8ba3b8cf7aca657ad8426981d810c36ee6a34a2f)
2007-12-29 13:17:01 +01:00
Michael Adam
0b7aafff11 Fix a const warning.
Michael
(This used to be commit e276e48177f890531ee8b4024c90352f284d4608)
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 9b3b9aa7e1044719a5112b9e5446e6fbdd7cecf9)
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 7b51535f2f76b5c3c18620ffd9ac64505357e6db)
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 306c7e4d9cecac4c2c0ea1172bd585c3c17d4541)
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 198232bd525cfac933b4885e6b330ebf4ac2c8ae)
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 c9c7607c402c0a9df9796c767b689d207d67d8e4)
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 dd6e09a65e67a9a16b35b078ebfb41da09926029)
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 e9694ae20e1da1d8c1cbb252e630815b561647dd)
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 80e73407ea326cc68cd8728845c7a1c0907e2201)
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 d7aaec713e17f93eed5177f0c3468deb625402a8)
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 7d0ec5bae155cda6620db04dcb7bd43db59241aa)
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 95d5dd9bb0546181cd499e6deabff562166412e3)
2007-12-29 01:17:39 +01:00
Michael Adam
dfa8d9356c Move format_value() to libnet_conf.c.
Michael
(This used to be commit 3422a5048ad4b7f789ec233356885d78dbdacf9a)
2007-12-29 00:05:58 +01:00
Volker Lendecke
245537f9bd Convert get_root_nt_token to memcache
(This used to be commit fada689893314bed2fc78588b3fd9b144f4c808a)
2007-12-28 17:24:39 +01:00
Volker Lendecke
d826fcf6df Remove a global
(This used to be commit 515f6a8cff7e28b0e98136f3214ef52512cfaf37)
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 069cd6d63a61065be7926230235e198c456d38ae)
2007-12-28 17:09:57 +01:00
Volker Lendecke
533d6f617e Remove static zeros
(This used to be commit dbcc213710a9af31b6094d4741a6f68f573dcdad)
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 44775ea38bc320ac8e2208769a8cde2c6f44f640)
2007-12-28 17:02:07 +01:00
Volker Lendecke
3c99b7773e Convert csamuser to memcache
(This used to be commit 476d3abf9c6142d99822212141fc3d843aca4798)
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 fed8f2abd704d1993146ad462d81f69367537cfb)
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 4260c79bf7687bd2ebcc4ca5e0a5f020a759c1fb)
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 5088b704791be2f36641fa0ec59dff7f289ae868)
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 d241bfa57729bb934ada6beabf842a2ca7b4f8a2)
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 2135dfe91bf1ae114a18c15286b535662200677d)
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 df7e447623ac03d81bec384f5cfe83c3976cf7b2)
2007-12-27 16:54:07 -08:00
Volker Lendecke
94ee39c23f Fix the non-gcc branch of "likely"
(This used to be commit 1e07368b5f96e4ada622682e38d260eb0c6185f2)
2007-12-28 00:12:14 +01:00
Volker Lendecke
e9b8eb1446 Remove a silly static
(This used to be commit ef75dcc9ffda85d77c8f22d0db702efbf8e642ed)
2007-12-27 22:33:02 +01:00
Volker Lendecke
bd7fc51f2d Fix the build
(This used to be commit 7fb858b350856d626fed6f062029fcf09b8251e2)
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 51448a9dca95de9d35dd8eea68fde2554cb69921)
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 e86d027823c85173c64e7b85406e98f6f7345b10)
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 d67b2634068be9c69082a2b8c22c831aba371cd9)
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 d78045601af787731f0737b8627450018902b104)
2007-12-26 17:12:36 -08:00
Volker Lendecke
23c965d947 typos
(This used to be commit 30fa3477c8f810d8f2b4c4be218509544735274c)
2007-12-27 00:22:07 +01:00
Volker Lendecke
07867ec373 Fix some memleaks
(This used to be commit 78b0b66cbac349625257260d2e45d918e0c93617)
2007-12-26 23:45:10 +01:00
Volker Lendecke
e70c97ef85 Remove the sampwent interface
(This used to be commit 9e80b969fb40766de2c9b1a05d16bf4d4c6e46f7)
2007-12-26 18:57:15 +01:00
Volker Lendecke
c90f731ef2 Convert pdbedit to use pdb_search_users
(This used to be commit 8a8f2583b8bda22f65c7483dea54ac823ed1c0c3)
2007-12-26 18:57:15 +01:00
Volker Lendecke
5f196fafd3 Properly destroy the pdb search object
(This used to be commit 514cf532248723e7f775dc5f8f2e6936e02b7a1c)
2007-12-26 18:57:14 +01:00