| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
smbd/chgpasswd.c.
smbd/chgpasswd.c
smbd/open.c: Ensure that we replace SIGCLD handler with CatchChildLeaveStatus()
*before* we expect to reap a child status - and reset it to CatchChild()
after we've done the sys_waitpid(). The original CatchChild() code
would eat the status code from the zombie in the signal handler, meaning
that the sys_waitpid() calls in check_access_allowed_for_current_user()
and chgpasswd would never return a status.
smbd/open.c:
smbd/reply.c:
smbd/close.c: Check error return on close() calls - ensure a valid error return
is sent back to the client. This catches the "file truncated"
bug when a user has run out of quota (or space) and the ENOSPC
error is returned on the *close()* call, not the write() (eg. on
an nfs mounted drive).
smbd/fileio.c: Added check for ESPIPE on sys_lseek() in file_seek() to allow
people to use Windows clients to communicate with UNIX fifo's
(like they could in 1.9.18).
Jeremy.
|
|
|
|
|
|
|
| |
wildcards against both long and short filenames in a trans2 wildcard
match. This fix gets us closer to NT compatibility (still not entirely
there yet.... one more issue I know about to fix....).
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All setuid code now resides in the one module lib/util_sec.c.
The interfaces this module exports are :
void gain_root_privilage(void); - Set real/eff/saved uid's to 0.
void gain_root_group_privilage(void); - Set real/eff/saved gid's to 0.
int set_effective_uid(uid_t uid); - Set eff uid *only* to given value.
int set_effective_gid(gid_t gid); - Set eff gid *only* to given value.
BOOL become_user_permanently(uid_t uid, gid_t gid); - Set real/eff/saved uid's and gid's
to uid and gid permanently - with no way back to root.
Most of the quota code now uses these calls (except for a few
special cases).
smbd/chgpasswd.c: Ensured the dochild exits in the fork()'d child.
libsmb/nmblib.c: Fix from Jasper for memory leak.
Jeremy.
|
|
|
|
|
|
|
|
| |
lib/system.c script/mkproto.awk include/includes.h: Added sys_readdir that
wraps readdir64.
lib/util.c: Changed gethostname() to use sizeof(hostname) as the second arg
for buffer size.
Jeremy.
|
|
|
|
|
| |
fd limits and always returns RLIM_INFINITY for a RLIMIT_NOFILE query.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
changes are bzero -> memset as the compiler on HPUX is very picky about
bzero (probably a strange define).
The significant changes are in configure.in, to fix the HPUX shadow.h
problem and also move the large file support to the correct place.
passdb/pass_check.c: Added includes for KRB5, DCE and AFS if requested in autoconf.
tests/trapdoor.c: Fix to use setresuid and setresgid if defined.
The rest of the changes are bzero -> memset.
Jeremy.
|
| |
|
|
|
|
|
|
|
|
|
| |
HAVE_SETRESGID and HAVE_SETRESGID_DECL defines, based
on the HAVE_SETRESUID checks.
I also updated the places that setresgid was being called
based on HAVE_SETRESUID being defined and made sure *both*
were defined before allowing the call.
Jeremy.
|
|
|
|
|
|
|
|
| |
lib/util.c: Debug messages for getrlim/setrlim calls.
libsmb/clientgen.c: Added session redirect code back in.
smbd/nttrans.c smbd/pipes.c: Correct fix for NT printer problem - catches
openX as well as nttrans open.
Jeremy.
|
|
|
|
|
| |
friends.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to map filenames before accessing the UNIX filesystem.
The other changes are to make the code that previously allways called
the ambiguous functions (such as file_size(), that internally called
dos_to_unix()) to be unambiguous.
For example: file_size() becomes "dos_file_size()", that calls
dos_to_unix(), and file_size(), that does not.
It is now very explicit when we are calling a dos mapping call
and when we are not.
Also added string_to_sid unsigned fix by adding the strtoul from libg++
code into lib/replace.c and testing for strtoul in configure.in.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
Needed as in the 64 bit file spec new open types are needed on many OS's
to be able to seek past 32bits.
Jeremy.
|
|
|
|
| |
instead of opening pipes and other horrible stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
should allow us to call a function in swat rather than piping to
smbpasswd.
while doing this I also fixed quite a few "const char *" versus "char *" issues
that cropped up while using const to track down bugs in the code. This
led to changes in several generic functions.
The smbpasswd changes should be correct but they have not been
extensively tested. At least if I have introduced bugs then we should
be able to fix them more easily than before.
|
|
|
|
| |
sorted lookupsids command
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
client/client.c:
client/clitar.c:
include/client.h:
smbwrapper/smbw_dir.c:
smbwrapper/smbw_stat.c:
smbwrapper/smbw.c:
lib/util.c: Converted all use of 'mode' to uint16.
smbd/quotas.c: Fixed stupid comment bug I put in there :-(.
printing/printing.c: Fix from J.F. to new code.
Jeremy.
|
|
|
|
|
| |
the reason we don't return() here is that smb_panic() is used not just
for segv but also for detected errors (such as buffer overflows)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
easier to read.
lib/util.c: Fixed Luke's set_first_token() function - should return void.
smbd/close.c: Move delete_on_close into file_fd_struct structure.
smbd/ipc.c: Changed local_machine back to fstring.
smbd/nttrans.c: Use defines for mapping share modes.
smbd/open.c: Move delete_on_close into file_fd_struct structure, added code for ALLOW_SHARE_DELETE.
smbd/reply.c: Use defines for mapping share modes.
smbd/trans2.c: Move delete_on_close into file_fd_struct structure.
Jeremy.
|
| |
|
|
|
|
|
| |
correctly trimming trailing multibyte code page strings.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
smb.tgz file from my portable.
particularly the call to mem_data followed by a realloc of that data in
cli_pipe.c's rpc_read() function.
smbd responses now use p->rdata_i which is a faked-up pointer into
p->rdata's response data. rdata can be very long; rdata_i is limited
to point to no more than max_tsize - 0x18 in length. this will make
it an almost trivial task to add the encrypted rpc headers after
rdata_i, and mem_buf_copy will cope admirably with rhdr chained to
rdata_i chained to auth_verifier etc etc...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- removed debug info in struni2 and unistr2 (security risk)
- rpc_pipe function was getting pointer to data then calling realloc *dur*
- password check function, the start of "credential checking",
user, wks, domain, pass as the credentials (not just user,pass which
is incorrect in a domain context)
- cli_write needs to return ssize_t not size_t, because total can be -1
if the write fails.
- fixed signed / unsigned warnings (how come i don't get those any more
when i compile with gcc???)
- nt password change added in smbd. yes, jeremy, i verified that the
SMBtrans2 version still works.
|
| |
|
|
|
|
|
| |
are *checked* :-).
Jeremy.
|
|
|
|
|
| |
have. Needed for server diagnosis purposes...
Jeremy.
|
|
|
|
| |
- ignore *.po32 files
|
|
|
|
| |
possible and return the max.
|
| |
|
|
|
|
| |
servers that we don't know the netbios name of.
|
|
|
|
|
|
| |
You can print using "cp filename /smb/SERVER/PRINTER/jobname"
You can list the current printqueue using ls
|
|
|
|
| |
filename
|
| |
|
| |
|
|
|
|
| |
- make msleep() non-static
|
|
|
|
|
|
|
| |
uid_t, gid_t and vuid. Added sys_getgroups() to get
around the int * return problem. Set correct datatypes
for all uid, gid and vuid variables.
Jeremy.
|
|
|
|
|
| |
These were the problems that still existed in the 2.0 branch.
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
Added function checks for srandom random srand rand.
Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
Moved enum action_type into rpcclient.h
Moved struct cli_state into client.h
Moved struct nt_client_info, struct tar_client_info, struct client_info
into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.
Jeremy.
|
| |
|
|
|
|
|
|
|
|
|
| |
on a machine that supports them in autoconf.
Move various functions out of lib/util.c into smbd/process.c
and smbd/oplock.c where they belong.
Jeremy.
|
|
|
|
|
|
| |
slow down my benchmark :-).
Jeremy.
|
|
|
|
| |
suffix from some constants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
widening (I hope :-).
include/config.h.in: Added #undef STAT_STATVFS64.
include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to
SMB_BIG_UINT and SMB_BIG_INT types.
include/smb.h: Added flag defines from CIFS spec.
lib/debug.c: Fixed one more mode_t issue.
lib/system.c: Added sys_statvfs wrapper.
lib/util.c: Changed trim_string to use size_t.
param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised
locking options. Question - shuld we do this for all options ?
passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT.
smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned
types.
smbd/dosmode.c: Fixed one more mode_t issue.
smbd/negprot.c: Changed literals to be FLAG_ #defines.
smbd/nttrans.c: Removed dead code.
smbd/open.c: Changed disk_free call.
smbd/process.c: Changed literals to be FLAG_ #defines.
smbd/reply.c: Changed disk_free call.
smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using
UNICODE - should use ascii.
tests/summary.c: Added STAT_STATVFS64 check.
Jeremy.
|
|
|
|
|
| |
calls to strlen() a profiling hotspot.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
| |
Got 'religion' about using size_t and ssize_t for read/write stuff
as part of the code to expose 64 bits to the client.
This checkin does all the 'easy' stuff - such as all the read/write/lock
calls - but now comes the harder parts (open & friends) and all the
file enquiry functions.....
Jeremy.
|
|
|
|
|
|
|
|
| |
painstakingly put in :)
This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around
DEBUG() statements. We just use %.0f in all cases. Makes the code a
bit easier to read :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...
I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).
in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.
So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)
One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
|