1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

3822 Commits

Author SHA1 Message Date
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
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
bd7fc51f2d Fix the build
(This used to be commit 7fb858b350856d626fed6f062029fcf09b8251e2)
2007-12-27 22:32:36 +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
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
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 6e6ec0a563f8b7e3d4618ce60e776bcce53f40c4)
2007-12-26 14:55:57 +01:00
Jeremy Allison
f980d3ea14 If we detect a case insensitive filesystem make
sure we don't search directories on name misses
for non-mangled names.
Jeremy
(This used to be commit 120048d2f40cf1a0ace2ecde205cbc694d263d69)
2007-12-22 17:38:18 -08:00
James Peach
596018455a Use filesystem capabilities to support case-insensitive filesystems.
If we know the underlying filesystem is case-insensitive, then we
know that it won't help to search for case variations of the requested
name.

Jeremy, please review (and revert if you disagree).
(This used to be commit 9e8b8f8c16612d8a08b55802f4fd9afca5498a7c)
2007-12-22 14:55:37 -08:00
James Peach
bf2269a04e Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 30cb2d215f1a4a440d5ecaab3f898daa714eee2b)
2007-12-22 14:01:44 -08:00
James Peach
1176e04c76 Cache the underlying filesystem capabilities at connection time.
This change alters the Samba connection code to cache the filesystem
capabilities when a new client connects. This can be used to enable
filesystem specific optimisations is a general manner.
(This used to be commit de3c5b808a941ac8e9ebe7169536d8290067eef5)
2007-12-22 14:01:25 -08:00
Michael Adam
a000fa4ee5 Remove redundant connection_struct from check_magic() parameter list.
Michael
(This used to be commit cebaa483e62910ac3f87cd135b2aff18dc880416)
2007-12-22 02:13:02 +01:00
Michael Adam
e47520f222 Remove redundant connection_struct from fd_close() parameter list.
Michael
(This used to be commit 3611cc8561cf837adea83fc7c16ca7535f188466)
2007-12-22 02:01:32 +01:00
Michael Adam
4773973300 Remove redundant connection_struct from fd_close_posix() parameter list.
Michael
(This used to be commit f3365b74ac016eaee1e82eef769dd618af5df201)
2007-12-22 02:01:32 +01:00
Volker Lendecke
99b86e4a26 Some C++ fixes
(This used to be commit 5c392c4c6e277a24d0d477902dc7856b2b46ee53)
2007-12-21 09:58:21 +01:00
Volker Lendecke
addf598cde Some C++ warnings
(This used to be commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d)
2007-12-21 09:58:20 +01:00
Volker Lendecke
dea7d2223d Fix a C++ warning
(This used to be commit 7e1d9b561f6df233b8c7eaec83d1e4207b5a2fb0)
2007-12-21 09:58:20 +01:00
Volker Lendecke
cc48010f41 Add a global cache
It hurts, but I think this global variable is necessary for transition, and it
has the potential to remove quite a few other global variables without messing
with APIs too much.
(This used to be commit c131d0dc52ec09c9227eff3d68877369c37aaed5)
2007-12-21 09:58:20 +01:00
James Peach
4c3c483fbf Fix typo in filesystem capabilities bits.
(This used to be commit 08fee0d28a20648d74c6b03d120eaf628f4de70c)
2007-12-20 08:31:27 -08:00
Volker Lendecke
8804f5bdd7 Attempt to fix the build
James, at least on my Linux system neither FILE_CASE_SENSITIVE_SEARCH nor
FILE_CASE_PRESERVING_NAMES seem to be defined anywhere. Is it possible that
this is a MacOS/X specific thing? If so, could you add configure tests for
this?

Thanks,

Volker
(This used to be commit 465fd4385013c95f9778d710d70796feae4eb858)
2007-12-20 10:33:13 +01:00
James Peach
2ee96c7ee3 Fix a couple of warnings in mDNS registration. One of these is an
actual bug where we pass a pointer instead of a pointer to a pointer.
(This used to be commit 36db6755103f01cb74bf4194fc81ca6d4b5320e4)
2007-12-19 22:33:43 -08:00
James Peach
2403b319a7 Add filesystem capabilities bitmask to statfs info.
This patch adds Darwin support for the Samba statfs VFS call. It
also adds a filesystem capabilities bitmask to the information
returned by the call.
(This used to be commit 555173eb3f6511e88798d6ef3d1fed0c219a9921)
2007-12-19 22:20:39 -08:00
James Peach
26b75f2d83 Expose per-fsp extension talloc context.
This patch supplements the fsp extension API with an operation to
retrieve the malloc zone pointer for that fsp.
(This used to be commit d5d9e4084cfb3db3bebff0334b93f376022ef5d3)
2007-12-19 22:20:09 -08:00
James Peach
d2a9630a8b Release per-fsp data on file closure.
(This used to be commit 9fead46b54519b3df78a869dbc99207046587d6a)
2007-12-19 22:19:55 -08:00
Michael Adam
233eb0e560 Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and
a file name. All the underlying functions should need and now
do need (after the previous preparatory work), is a connection_struct
and a file name. The connection_struct is already there in the
vfs_handle passed to the vfs functions. So the files_struct
argument can be eliminated.

This eliminates the need of calling open_file_stat in a couple
of places to produce the fsp needed.

Michael
(This used to be commit b5f600fab53c9d159a958c59795db3ba4a8acc63)
2007-12-19 23:08:01 +01:00
Michael Adam
8e2323e391 Split get_nt_acl() into two functions: fsp- and non-fsp variant.
Replace smbd/posix_acls.c:get_nt_acl() by two funcions:
posix_get_nt_acl() and posix_fget_nt_acl(). The first
takes a connection struct and a file name instead of a
files_struct pointer. This is in preparation of changing
the vfs api for SMB_VFS_GET_NT_ACL.

Michael
(This used to be commit 50c82cc1456736fa634fb656e63555319742f725)
2007-12-19 23:07:56 +01:00
Michael Adam
a7e15d41c6 Remove the "is_directory" parameter from canonicalise_acl():
It can be retrieved from the stat buffer.

Michael
(This used to be commit b0ae830bf57dcaec00b2a2eabfec7221a3b7f791)
2007-12-19 23:07:56 +01:00
Michael Adam
13e0788714 Change canonicalise_acl() to not take an fsp.
Convert canonicalise_acl() to take connection_struct, is_directory
and file name instead of files_struct pointer.

Michael
(This used to be commit d579a7f84fd47a3f00215725cecd65b21a5ff2e0)
2007-12-19 23:07:55 +01:00
Michael Adam
c5d21d1a65 Change ensure_canon_entry_valid() to not take and fsp.
Convert ensure_canon_entry_valid() to take share_params and an is_directory
flag instead of an files_struct pointer.

Michael
(This used to be commit bdb208124bd703edee03ac4d2a4ec45ecdfc135e)
2007-12-19 23:07:55 +01:00
Michael Adam
bb89f8cb94 Change apply_default_perms() to not take an fsp.
This is a first change in a series: Pass what is needed instead of files_struct
pointers to some functions. This is in preparation of introducing two variants
of get_nt_acl - one for fname (which does not need an fsp), one for file
descriptor.

This changes apply_default_perms to take share_params (rather thatn snum)
and an is_directory flag instead of an fsp.

Michael
(This used to be commit d7e2e93758f6598a0459db3255300558618f066e)
2007-12-19 23:07:55 +01:00
Volker Lendecke
e518e19bc0 Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f59315497113aebadcf9ad387e3dbfffa284a)
2007-12-19 21:09:10 +01:00
Jeremy Allison
a34c6cd0e7 Remove last_message completely as it's no longer used.
Jeremy.
(This used to be commit c378c3edc1197d46c5d6eb2bcabbf9e774c03ffc)
2007-12-18 18:10:09 -08:00
Volker Lendecke
f427d4ce65 Add a in-memory cache
This is a more general API that caches data with a LRU scheme. See
include/cache.h. No comments yet, I'm still working on it. But Jeremy has given
me a hint in one of his checkins that he would like to make use of this now.

The idea is that we get rid of all our silly little caches and merge them all
into one cache that we can then very easily trim, for example even with a
smbcontrol message if someone decides memory is tight. The main user is the
stat cache, this patch also converts the getwd cache. More caches to come.
(This used to be commit 7a911b35713538d82001a3c9f34152e293fe1943)
2007-12-18 09:56:04 +01:00
Jeremy Allison
192aae0564 Remove more static fstrings (yes this little cache should be
in the rbtree....).
Jeremy.
(This used to be commit 97cfdae4052d46a35040d4c1a4ade8bf2c41dbc7)
2007-12-17 17:27:29 -08:00
Jeremy Allison
8f28bda7f8 Fix bug #5121 (unix passwd sync not working on a streams based
system).
Jeremy.
(This used to be commit 545cd2139cfc9484b733693814d4724d37125942)
2007-12-17 10:44:09 -08:00
Jeremy Allison
bd1172d106 Remove a static fstring.
Jeremy.
(This used to be commit 898c56c0ead6331721de9645ce55608cbe7cf34d)
2007-12-16 18:02:32 -08:00
Volker Lendecke
8c6e781c3c make use of [un]marshall_sec_desc, allow for fd==-1 in get/set_secdesc
(This used to be commit 585f5f8831f13260808a82611656fc6ca5caee81)
2007-12-16 14:05:30 +01:00
Jeremy Allison
d76b086cc9 More work on bug #5082, use LC_ALL as this takes
precedence.
Jeremy.
(This used to be commit 446ebae76d6796b30e4c71ff7190337c28637be6)
2007-12-15 22:28:38 -08:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
2007-12-15 22:09:36 +01:00
Jeremy Allison
3cdd8da3ca Fix for bug #5082 from Mathias Gug <mathiaz@ubuntu.com>, Steve Langasek <vorlon@debian.org>.
Recent versions of Linux-PAM support localization of user prompts,
so Samba must use the C locale when invoking PAM (directly or via
/usr/bin/passwd) to ensure that password chat values match the prompts in a
locale-invariant fashion.
Jeremy.
(This used to be commit bc13e939546a5bcb78925a6b117e89fde20f6451)
2007-12-14 17:02:50 -08:00
James Peach
40889dccdf Move dns_sd.h include to fix the build.
(This used to be commit cf221a94bd8794add508a2b9305b8c0d40c3346a)
2007-12-13 22:12:21 -08:00
Rishi Srivatsavai
12ac4c3119 Register the smb service with mDNS if mSDN is supported.
If mDNS is supported, attempt to register the first port we are
listening on for the _smb._tcp service. This provides more reliable
service discovery than NetBIOS browsing.
(This used to be commit 1e7241517d1f55d60af22570e0c9feb280e3fdb5)
2007-12-13 20:56:29 -08:00
Volker Lendecke
39ea0edbbe separate out create_file_unixpath()
(This used to be commit deaacf971e0fbffd0e5fe24f225ebf645a77e133)
2007-12-11 16:16:54 +01:00
Volker Lendecke
3063f85a72 Move more stuff out of the way
(This used to be commit ae422fce01cd7520d6dd72e08719a5cd003cb640)
2007-12-11 16:16:54 +01:00
Volker Lendecke
0ac113e5a2 Move INTERNAL_OPEN_ONLY calculation out of the way
(This used to be commit 0e96549b56e288c596ed8772197f97ffa5ade300)
2007-12-11 16:16:54 +01:00
Jeremy Allison
09fcb233a3 Don't need an fstring here, we can talloc.
Jeremy.
(This used to be commit 3f6cc826378729c9157ea68e7cf5c7b584bbb585)
2007-12-10 15:31:05 -08:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-12-10 11:30:37 -08:00
Volker Lendecke
2585232054 Simplify add_session_user
(This used to be commit f98082ccf048a2de6fea8d922264879305b3d2c8)
2007-12-10 12:22:01 +01:00