| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
ERROR_INSUFICIENT_BUFFER when working out what space is needed. This fix
gives us the same return that WinNT does.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
with the current user. This will allow se_access_check() to quickly do
a SD check without having to translate uid/gid's to SIDs.
Still needs work on pipe calls.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get ready and fix se_access_check().
Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid()
functions that look via winbind first the fall back on local lookup.
All Samba should use these rather than trying to call winbindd code
directly.
Added NT_USER_TOKEN struct in user_struct, contains list of NT sids
associated with this user.
se_access_check() should use this (cached) value rather than attempting
to do the same thing itself when given a uid/gid pair.
More work needs to be done to preserve these things accross security
context changes (especially with the tricky pipe problem) but I'm
beginning to see how this will be done..... probably by registering
a new vuid for an authenticated RPC pipe and not treating the
pipe calls specially.
More thoughts needed - but we're almost there...
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- changed the default forms flag to 2
- all short architecture name are uppercased
- get_short_archi() is now case unsensitive
- the drivers TDB is indexed by archi/version/name
- implemented code to move drivers from the upload area to the download
area. Someone else need to look at that code.
- don't return anymore a default driver if it doesn't exist in the TDB.
Instead return an error.
- cleaned prs_unistr.
- #ifdef out jeremy's new SD parsing in printer_info_2
- removed the unused MANGLE_CODE
- #ifdef out the security checking in update_printer() as it doesn't work
for me.
Zap your ntdrivers.tdb, it won't work anymore.
J.F.
|
|
|
|
|
|
|
| |
Removed msrpc_local struct
--jerry
|
| |
|
|
|
|
|
| |
structure so authenticated pipe users can have their unix groups set when
become_authenticated_pipe_user() is called.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
semi-connection and a rpcclient prompt, but no functionality there yet.
Will be a few more days on that.
The changes to the header files were minor. A few struct's and a few
additional fields to existing ones. No deletions. **minimal change
necessary** :-) Well, maybe not minimal, but I tried.
All other programs compile, link and run ok from what I can tell so
I don;t think I broke anything.
--jerry
|
|
|
|
| |
Moved the S_* macros from smb.h to includes.h
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
|
| |
modular form. In this pass I added oplock_irix.c and added a "struct
kernel_oplocks" that describes a kernel oplock implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
place to do this, not in smbd/passwd.c
Please don't change this without asking first, I have run this past
Andrew so talk to him (I'm on vacation next week).
I also removed the g_newXXX macros. There are essentially a private C extension,
not used anywhere else in the code, and add no functionality over malloc(XX)
and make the code harder to understand (everyone knows what malloc does).
Jeremy.
|
|
|
|
| |
not just undercut work in progress, thank you.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there (yet)
as there is no infrastructure for it. Replaced it with a dynamic array
of group SIDs plus a user.
passdb/passdb.c: Added setup_user_sids() function. This is where the lookup should be done,
eventually calling winbind.
smbd/password.c: Changed to call setup_user_sids(). Removed spurious DEBUG(0) statements.
smbd/reply.c: Removed extra parameter to register_vuid().
Jeremy.
|
|
|
|
| |
register_vuid fills it with constructed info.
|
|
|
|
| |
- added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX
|
| |
|
| |
|
|
|
|
| |
on the samba server.
|
|
|
|
| |
- got rid of guest map code in lpq parser
|
|
|
|
|
|
|
|
| |
userdom_struct. As the name implies this also contains a domain
(unused at the moment).
This will be important shortly, as operation in appliance mode needs
the domain to be always carried with the username.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implementation keeps all POSIX lock records in a separate in memory
tdb database only known about in locking/posix.c. In addition, the pending
close fd's are also held in a tdb which has an array of fd's indexed by
device and inode.
The walk-split code uglyness has been moved to posix.c from brlock.c,
which is the only place that needs to know about it, and the extra
functions hacked into brlock to expose internal state have been removed.
This implementation passes smbtorture locktest4, the only thing I need
to check now for completeness is what to do about lock upgrade/downgrades
which Win32 allows under some *very* strange circumstances.
Jeremy.
|
|
|
|
| |
Added dfs_server announcement in set_default_server_announce_type()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a file is being closed, once it passes the fnum and tid tests then
the locking context should be ignored when removing all locks. This is
what is done in the brl close case, but when you have outstanding
POSIX locks, then you cannot remove all the brl locks in one go, you
have to get the lock list and call do_unlock individually. As this
uses global_smbpid as the locking context, you need to make sure
that this is set correctly for the specific lock being removed. I
now do this by storing the smbpid in each entry in the unlock list returned from
the query call. I removed the smbpid from fsp (not needed) and
things seem ok (even with the stupid smbpid tricks that smbtorture plays :-).
Jeremy.
|
|
|
|
|
|
|
|
| |
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
removed from the smbd/open.c code.
We now use a dlink list of structures indexed by dev/inode to store
all pending fd's for close. This could be rewritten to use lib/hash.c
if this is discovered to be too slow in use.
Andrew, please take a look and let me know if this is what you
had in mind.
Jeremy.
|
|
|
|
|
|
|
| |
test. Was miscounting posix locks, plus was not taking into account
the case where other_fsp == fsp in the 'move locks' case. DOH ! This
code will be re-written anyway :-).
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
HEAD should now map brl locks correctly into POSIX locks, including the
really nasty case of large range unlock.
There is a lot of pretty ASCII art in locking/brlock.c explaining
exactly how this code works. If it is unclear, please ask me.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
open on the same dev/inode pair with existing POSIX locks.
This is done at the smbd/open layer, so smbd just calls fd_close() and
the transfer of any open fd's is done under the covers of fd_close().
When an fsp is closed and no other fsp's open on the same dev/inode
pair have existing POSIX locks then all fd's associated with this fsp
are closed.
Now only the hard part of doing the POSIX range unlock code when read
locks overlap remains for full POSIX/SMB lock integration....
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
| |
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-).
NB for Luke, this patch also did not apply to TNG. TNG is not yet
identical w.r.t file serving with HEAD. This makes it impossible for
me to help maintain TNG. Please fix asap.
lib/substitute.c: Removed unused variable (pidstr).
Jeremy.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
but the structure is done enough so that Andrew can look it over and give
a yea/nay decision.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
With the new br_lock() code we no longer need the fd multiplexing,
which is great because it was really horrible :)
Moved the dev, inode and delete_on_close elements into the fsp.
A nice side effect is that this has greatly simplified open.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
wrong in the spoolss case.
fxed a bug in the job notify code (that's the polite answer), the truth is
different: there is a bug in the NT spooler service, including SP6a and
NT2K.
changed the default lpcommand in the LPRNG case.
J.F.
|
|
|
|
|
|
|
|
| |
smbd/negprot.c:
smbd/reply.c: Fixes to recognise Win2k.
param/loadparm.c: Put debug timestamp parameter back to correct default.
smbd/nttrans.c: Fix to detect Win2k unicode bug with transact create.
Jeremy.
|
|
|
|
|
|
| |
added info level 1 parsing code for addprinter(ex)
J.F.
|
|
|
|
|
|
|
| |
-Wpointer-arith -Wcast-qual
Partially implemented rpc daemon redirect (needs more work).
Jeremy.
|
|
|
|
| |
this explains why j-f wasn't happy.
|
|
|
|
|
|
|
|
|
| |
undecoded, nothing in MSDN, but now it works :-)
cleanup of error codes.
fixed some dfs declarations function.
J.F.
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the printer functions.
Also tidied up some header includes and got the order right so you
can now do a :
make proto
make clean
make
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added a new msdfs/ directory under source/
* added msdfs sources under this directory.
* modified configure setup to add a --with-msdfs configure time option
Modified Files:
Makefile.in acconfig.h configure configure.in
include/config.h.in include/includes.h include/proto.h
include/smb.h include/smb_macros.h param/loadparm.c
smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c
smbd/server.c smbd/trans2.c
Added Files:
include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c
msdfs/parse_dfs_map.c
----------------------------------------------------------------------
|
|
|
|
|
|
|
| |
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
|
|
|
|
| |
Jeremy.
|