1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
Stefan Metzmacher
b0c0d73691 * Fix sys_chown() when no chown() is presend
metze
0001-01-01 00:00:00 +00:00
Jeremy Allison
019aaaf0df Patch based on work from James Peach <jpeach@sgi.com> to convert over to
using pread/pwrite. Modified a little to ensure fsp->pos is correct.
Fix for #889.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1b1c216122 Fix from James Flemer <jflemer@uvm.edu> to make HAVE_ATTR_LIST linked to
HAVE_SYS_ATTRIBUTES_H to fix AIX compile.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
9df3f53e6a wrap internals of sys_setgroups() so the sys_XX() call can be done unconditionally; bug 550 0001-01-01 00:00:00 +00:00
Herb Lewis
589e94f4ff add IRIX EA support 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
d3c02b40c4 Use filedes as first argument to fsetxattr, not the undefined variable 'path' :-) 0001-01-01 00:00:00 +00:00
Jeremy Allison
4885314074 Get ready for EA code... Add Linux interface.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
54e5413a92 dlysym takes a const char *.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9e5297131c Merge from HEAD - add PRINTF_ATTRIBUTE to a few more functions. 0001-01-01 00:00:00 +00:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
3928578b52 sync 3.0 branch with head 0001-01-01 00:00:00 +00:00
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 0001-01-01 00:00:00 +00:00
Jeremy Allison
74eac41c68 Added sys_adminlog() system for info the appliance admins really
need to know about. Different from the DEBUG system.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ac1baba35d Removed HAVE_LIBDL from most places (except system.c). Added checks for
dlopen & friends into configure.in. This should help building on *BSD
where dl*** calls are in libc.
Jeremy
0001-01-01 00:00:00 +00:00
Jeremy Allison
ad1e858d8e Sync up vfs changes from 2.2.x.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6210d4aa19 Getting ready to add UNIX extensions in HEAD also.
Jeremy
0001-01-01 00:00:00 +00:00
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
Simo Sorce
60e907b7e8 move to SAFE_FREE() 0001-01-01 00:00:00 +00:00
Jeremy Allison
ed5a1f70c6 Wrapped dlerror() in the same way as the other dlxxx() calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c24e6b41ea Ensured all the system calls in msdfs.c go through the vfs layer.
Added vfs calls to symlink() and readlink() with appropriate configure
checks.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
dc31b47ded Fixed password entry caching bug pointed out by Elrond.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5b9a88c2d0 Sync up with 2.2 ACL code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
49f0e7e714 Added sys_dlopen/sys_dlsym/sys_dlclose.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
348ebe30d0 removed useless debug msg 0001-01-01 00:00:00 +00:00
Jeremy Allison
af364b93d9 lib/system.c (Finally) fixed all insure errors in password caching code. We can't
stop libc routines from calling getpwXXX functions, so caching a pointer to them
is impossible. This new code now makes two copies of the returned struct passwd
struct - one used as a cache, one returned to allow the caller to modify. When
doing a lookup we compare against the cached copy. Code is now easier to understand
also.
smbd/posix_acls.c: If we move the head of the linked list, remember to pass a
reference to that pointer.....
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
a55a4fea97 change pstrcpy() in setup_pwret() to fstrcpy() since we are
using fstrings.  Spotted by Elrond.  Thanks :-)




jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
c4f810a758 lib/system.c: Fix for pw caching.
srv_samr.c: Fix for pw caching.
smbd/nttrans.c: Fix to allow trans create to set ACL on open.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2bd4f16389 Fix insure problems with passwd caching code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3712e35c54 Added modification to Richard Bollinger getpw[nam|uid] cache patch. Only
uses cache max 100 times.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
158430ba6a getpw[nam|uid] caching patch from "Richard Bollinger"
<rabollinger@home.com>



jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
1f156b2420 sys_popen got damaged when converted from FILE * to int fd I think.
Patrick Powell kindly pointed out the bug.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d8b9ec741c added a hack to get 64 bit locking working with the broken fcntl()
call in glibc 2.1.95. This hack only gets enabled if you define
GLIBC_HACK_FCNTL64
0001-01-01 00:00:00 +00:00
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!
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b5ceab8102 continued the split of the kernel level oplocks code into a more
modular form. In this pass I added oplock_irix.c and added a "struct
kernel_oplocks" that describes a kernel oplock implementation.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
70dcc791b4 clean up oplock capability code ready for Linux code 0001-01-01 00:00:00 +00:00
Jeremy Allison
148628b616 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f137648504 got rid of some more old configure tests and includes 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a09470817c converted a bunch more functions to use a fd instead of a FILE*
to support some of this I added the following functions in util_file.c

file_lines_pload : load lines from a pipe
file_pload : load a pipe into memory
0001-01-01 00:00:00 +00:00
Jeremy Allison
3b8cbb10de Fixes to add "paranoid" option to popen. Checks some basic things.
Jeremy
0001-01-01 00:00:00 +00:00
Jeremy Allison
9f879ec396 lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b52e92b09d Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as
they don't use a shell to exec the requested command. Now we have
these functions they can be tightened up (environment etc.) as required
to make a safe popen. It should now be safe to add the environement
variable loading code to loadparm.c
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ca64f4ab00 include/includes.h: Trimmed down unicode directory entry to be POSIX complient.
lib/system.c: Trimmed down unicode directory entry to be POSIX complient.
lib/util_unistr.c: Added wstrdup().
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b5eb009cc3 First cut at unicode sys_xx functions. Now to start moving upwards.....
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Luke Leighton
e4d92ff9df sys_select added one more argument (read, write selectors). 0001-01-01 00:00:00 +00:00
Luke Leighton
0d1f5e5a6d check to see if copy_passwd_struct() ever receives its own internal
buffer as an argument :-) :-)
0001-01-01 00:00:00 +00:00