1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

3560 Commits

Author SHA1 Message Date
Andrew Tridgell
41af3232db dump in a binary format -
Andrew Tridgell
044af3cf97 use an size_t not a ssize_t when checking for out of bounds errors -
Andrew Tridgell
2fba24ef0e moved INSURE hook into util.c -
Andrew Tridgell
780713f67a fixed another memory leak -
Andrew Tridgell
a559a8066f fixed a parameter bug found by insure -
Andrew Tridgell
8c726b9764 moved the INSURE hook into util.c -
Andrew Tridgell
ba1931bb65 more pstring/fstring errors found by insure -
Andrew Tridgell
990b16fcf7 fixed a locking database bug - it was actually harmless except that
smbstatus could display the wrong filename when files change dev/inum
after a rename
-
Andrew Tridgell
defbedd198 don't close high fd's in smbrun when using insure (prevents closing
error fd)
-
Andrew Tridgell
91ed7d8ffe another fstring/pstring fix -
Andrew Tridgell
d9b4076293 fixed another spoolss memory leak
I am falling in love with insure - it is finding _lots_ of memory
problems
-
Andrew Tridgell
4c889d08ae fixed a memory leak I caused last week with my lines[] changes -
Andrew Tridgell
b7c7a4d564 split out standard_sub_basic() again to fix a bug where %p was being
substituted in the loadparm code and thus leaving lpq with no printer
-
Andrew Tridgell
8af70f2887 we can't pass a fstring to a routine expecting a pstring -
Andrew Tridgell
381ddb464f check for a valid snum when running a printing command -
Andrew Tridgell
980a81651a Makefile.in change for split of printfsp.c -
Andrew Tridgell
82df25b28b split fsp specific routines out of printing.c to fix linking problem
in TNG
-
Andrew Tridgell
e4ddd1a4a9 fixed two uninitialised memory references -
Andrew Tridgell
bb9b3e03de trick to get full stack trace when using the free version of insure -
Andrew Tridgell
53077295b7 insure caught an uninitialised memory reference - ensure it starts as
zero
-
Andrew Tridgell
062d79bf8b avoided a memory leak in the ubi code by deleting a mangled cache
entry before adding to ensure that we don't ever add a duplicate entry

this code can be removed when ubi gets fixed
-
Andrew Tridgell
be7186b0dd fixed a prs memory leak (weren't freeing input buffer) -
Andrew Tridgell
1c6322473a if using insure then don't close fd 2 -
Andrew Tridgell
9416b58b9c return NULL for a zero size memdup -
Andrew Tridgell
d0fc1675df don't copy a null groups list -
Andrew Tridgell
1106fa7f24 fixed overlapping strcpy() found by insure -
Andrew Tridgell
14251aab2e fixed uninitialised snum -
Jeremy Allison
ab0ecc39d6 This is a *big* checkin that may break some things, but implements the
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.
-
Andrew Tridgell
763704f78f use sys_fsusage() not disk_free() in printing.c -
Andrew Tridgell
e2eacdd74c split fsusage() into a separate module (to fix linking problems with
spoolssd in tng)
-
Andrew Tridgell
95246a8432 patch from luke to split out lanman code from ipc.c into lanman.c -
Andrew Tridgell
2c2d95d77d - got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot
-
Jeremy Allison
8a99d824c0 Sync up with 2.0.7 w.r.t. guest users.
Jeremy.
-
Jeremy Allison
204ca1195c locking/locking.c: Fixed placeholder code for POSIX locking.
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning.
                     tmpfile gives mirror warning.
smbd/groupname.c: Remember to file_lines_free() on exit.
tdb/tdb.h: Add tdb_traverse_func typedef.
Jeremy
-
Andrew Tridgell
36fb5bc72f updates from the TNG branch -
Andrew Tridgell
8b1afe7e1a don't parse blank lines -
Andrew Tridgell
e505a6ddf3 fixed some crash bugs in the nt forms parsing -
Luke Leighton
a0afe0d5f8 ReadDirName calls vfs->readdirname calls dos_readdirname.
replaced with readdirname.  ditto for OpenDir and CloseDir.
-
Shirish Kalele
462ea8b7fd Corrected minor parsing errors.
Not adding a Dfs junction to msdfs.tdb if it doesn't have any referred paths
as parsed from the dfsmap file.
-
Shirish Kalele
3b79df2468 When parsing a dfs map for a service, see if the mount points exist that stand
for token junction points in the Dfs. If not, create these mount points as
subdirectories of the service directory.
-
Andrew Tridgell
f137648504 got rid of some more old configure tests and includes -
Andrew Tridgell
e8905a557a removed some obsolete configure tests (sysv ipc etc) -
Andrew Tridgell
030ec8e71f moved standard_sub() and friends into a separate module -
Andrew Tridgell
384ecd9d66 converted a couple more functions to use a fd instead of a FILE*
added a new utility fn file_lines_slashcont() which is used to handle
files that treat a \ followed by a newline as a blank
-
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
-
Andrew Tridgell
92f85cef8b got rid of FILE* in the unix name mapping code -
Andrew Tridgell
ad56e3d791 got rid of all the FILE* calls in the NT print system.
this also fixes a few security holes in that code. JF - you need to be
careful about open files for writing! symlinks can trap you.

note that I always unlink() the file first, then open with
O_EXCL. That is a cheap trick to avoid the symlink problems.
-
Andrew Tridgell
bd5cd502bf added fdprintf()
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.
-
Andrew Tridgell
9f49d17d4c removed old comments -
Andrew Tridgell
5f5b79c926 improved the error handling and added queue pause and resume -