| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new open mechanism Andrew & I discussed.
config.sub:
configure: Included the QNX patch.
include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).
Note that we will also need locking calls in the vfs (to be added).
lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
Also fix for sidsize DOS bug.
locking/locking.c: Check value of ret before using it for memdup.
printing/printing.c: Convert print_fsp_open to return an allocated fsp.
rpc_server/srv_lsa.c: Fix for NT domain logons.
I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.
smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.
smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
open_file_stat to return an fsp from the call.
smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
open_file_stat to return an fsp from the call.
In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.
The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.
This code will need extensive testing but seems to initially work.
Jeremy.
|
|
|
|
| |
spoolssd in tng)
|
|
|
|
| |
- cleaned up the standard_sub_*() calls a lot
|
| |
|
| |
|
| |
|
|
|
|
|
| |
added a new utility fn file_lines_slashcont() which is used to handle
files that treat a \ followed by a newline as a blank
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
this is like fprintf() but operates on a file descriptor
combined with file_load_lines() this makes it really easy to get rid
of the use of fopen() in Samba.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.
Major changes include:
- all print ops are now done in printing/*.c rather than scattered all
over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better
I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.
|
|
|
|
| |
a connection structure
|
| |
|
|
|
|
|
|
|
| |
3MB to 250k.
I split the table into 3 sections, after noticing that 5/6 of the
table was empty.
|
|
|
|
|
| |
in general we need to get rid of all uses of fopen(). The hard one
will be the debug code and dbf.
|
|
|
|
|
|
|
| |
Modified to do checks in timeout processing not in main loop. This (IMHO)
is the correct place as (a) we are already root, and (b) it is guarenteed
to be called every 200 smb requests.
Jeremy.
|
| |
|
|
|
|
|
|
| |
We now get/set/check POSIX locks, but I still need to code up the
close fd braindamage...
Jeremy.
|
|
|
|
|
|
| |
code will be removed soon and a SID auto-generated from (probably) primary
hostname and never stored in a file will replace it.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
| |
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
assumption that we have one socket everywhere
while doing so I discovered a few bugs!
1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary
2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.
3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
|
|
|
|
|
|
| |
TNG
out unicode string handling functions need a lot of work
|
|
|
|
|
|
|
|
|
| |
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.
the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
|
| |
|
|
|
|
|
| |
secure file create.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.
Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.
Jeremy.
|
|
|
|
| |
Jeremy
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
-Wpointer-arith -Wcast-qual
Partially implemented rpc daemon redirect (needs more work).
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixed typo in SPOOLSS_SYNT
some cleanup of unused functions
wrote make_spoolss_enumprinter and make_spoolss_openprinterex for
rpcclient as I'm trying to keep in sync the parsing code between HEAD and
TNG.
Will commit changes to TNG after lunch.
J.F.
|
|
|
|
|
|
| |
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
him! :-).
Jeremy.
|
|
|
|
|
| |
seems to have drifted a little.
Jeremy.
|
|
|
|
|
|
| |
fixed a stupid bug in unistr2_to_ascii that I introduced
fixed getprinterdata()
|
|
|
|
|
|
|
| |
I added 2 UNICODE <-> ASCII functions which _don't_ honor codepage
support.
J.F.
|
|
|
|
| |
accessing files on local disk.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
Stop makeing function calls for every use of skip_multibyte_char. This function
is called several *million* times during a NetBench run :-).
Jeremy.
|
|
|
|
|
| |
Inline several commonly used functions as macros.
Jeremy.
|
|
|
|
| |
msrpc loop-back interface.
|
|
|
|
| |
use string_set() instead, to avoid the bug Richard discovered
|
|
|
|
|
| |
Fixed locking bug found by Andrew.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
|
| |
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()
this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
|