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

38 Commits

Author SHA1 Message Date
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Volker Lendecke
638c848c9a r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
2007-10-10 12:30:36 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
9b10dbbd5d r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
2007-10-10 12:22:52 -05:00
Jim McDonough
9463211bf3 r21324: Add linux setlease to the vfs layer. Next round, as Volker points out,
it should be abstracted a little higher up so other os'es can have an
entry, but it will take a bit more work.  Thanks to Chetan Shringarpure
and Mathias Dietz.

I didn't increment the vfs number again because the kernel change notify
stuff hasn't been released yet anyway.
2007-10-10 12:17:56 -05:00
Volker Lendecke
8b6f5937db r17896: Reformatting. I did not want to do it anymore, but these ones looked just
silly :-)

Volker
2007-10-10 11:38:57 -05:00
Jeremy Allison
fd6fa1d4ea r15668: DOS or FCB opens share one share mode entry from different
fsp pointers. Ensure we cope with this to pass Samba4
DENY tests (we used to pass these, there must have been
a regression with newer code). We now pass them.
Jeremy
2007-10-10 11:17:06 -05:00
James Peach
e817cfd7d3 r15446: Tidy up the formatting of locking debug messages and make it more
consistent. Bring oplocks withing the purview of the locking debug
channel.
2007-10-10 11:16:45 -05:00
Volker Lendecke
2c3d5c029a r12735: After talking to Tridge and Jeremy... This needs to be made more generic
before it goes in.

Volker
2007-10-10 11:06:02 -05:00
Volker Lendecke
2253b17a1a r12721: GPFS 2.4 on Linux will contain some windows semantics, ie share modes and
oplocks across the cluster. Adapt Samba to it.

The gpfs API is called via libgpfs.so. This code is written with dlopen(), so
that you can compile on a system with gpfs installed and later on run on
systems without gpfs available.

So to actually make Samba call gpfs share mode calls you need to compile with
gpfs.h and libgpfs.so around and set 'gpfs share = yes' on the shares you
export from GPFS.

Volker
2007-10-10 11:06:01 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
c7fe18761e r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
2007-10-10 10:58:18 -05:00
Gerald Carter
a112c5570a r7440: * merge registry server changes from trunk (so far) for more
printmig.exe work
* merge the sys_select_signal(char c) change from trunk
  in order to keeo the winbind code in sync
2007-10-10 10:57:09 -05:00
Herb Lewis
173375f8d8 r6586: get rid of a few more compiler warnings 2007-10-10 10:56:46 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Tim Potter
23443e3aa0 Fix more 64-bit printf warnings. -
Jeremy Allison
e065c3a58f Fix from Steve G <linux_4ever@yahoo.com>. Ensure sigemptyset is called on
the sa_mask to prevent valgrind complaints.
Jeremy.
-
Andrew Tridgell
03a5e62300 merged real time signal fixes from head -
Andrew Bartlett
2a1adb8f81 Merge indirection, signed/unsigned and uninitialiased-value fixes from HEAD.
Andrew Bartlett
-
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
86c2f96366 Fixed unsigned / long unsigned format missmatch.
Jeremy
-
Jeremy Allison
058ae6b58f Move from timestamp to gen count file id's for finding oplocked files
in a tdb.
Jeremy.
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Andrew Tridgell
60d2973034 convert more code to using d_printf -
Andrew Tridgell
e2ecff419f fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define -
Tim Potter
88a7b2c3f8 More compiler warning fixes. -
Jeremy Allison
b35ca2c6b1 Fix from matthew.hart@veritas.com - bad error return from linux_oplock_receive_message().
Jeremy.
-
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
Jeremy Allison
b737c784e3 Paranoia changes to ensure that anything touched by a signal handler
and the main code is declared as VOLATILE SIG_ATOMIC_T.
Jeremy.
-
Andrew Tridgell
c6be511fcc enable the Linux change notify code and change some notify debug code -
Andrew Tridgell
44766c39e0 totally rewrote the async signal, notification and oplock notification
handling in Samba. This was needed due to several limitations and
races in the previous code - as a side effect the new code is much
cleaner :)

in summary:

- changed sys_select() to avoid a signal/select race condition. It is a
  rare race but once we have signals doing notification and oplocks it
  is important.

- changed our main processing loop to take advantage of the new
  sys_select semantics

- split the notify code into implementaion dependent and general
  parts. Added the following structure that defines an implementation:

struct cnotify_fns {
	void * (*register_notify)(connection_struct *conn, char *path, uint32 flags);
	BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t);
	void (*remove_notify)(void *data);
};


then I wrote two implementations, one using hash/poll (like our old
code) and the other using the new Linux kernel change notify. It
should be easy to add other change notify implementations by creating
a sructure of the above type.

- fixed a bug in change notify where we were returning the wrong error
  code.

- rewrote the core change notify code to be much simpler

- moved to real-time signals for leases and change notify

Amazingly, it all seems to work. I was very surprised!
-
Andrew Tridgell
cc0e919fdc a better test for oplocks being enabled in this kernel -
Andrew Tridgell
afa98d511f fixed Linux capabilities handling
I used a trick where CAP_LEASE isn't claimed until it is needed. This
means we avoid a system call per setreuid(), and never call capset()
unless a user tries to get a oplock on a file that they don't own
-
Andrew Tridgell
b28cc4163b Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
-
Andrew Tridgell
3253085d98 a first pass at Linux kernel oplocks support -