summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix to allow a timestamp of zero to cause an instantaneous changenotifyJeremy Allison2000-09-201-1/+10
| | | | | | scan - then call this from renames. This allows instantaneous update for W2k renames. Jeremy.
* we should not lowercase the username we receive inAndrew Tridgell2000-09-121-2/+0
| | | | | | | reply_sesssetup_and_X(). The getpwnam() wrapper handles the case munging operations later. this fixes a problem with mixed case usernames.
* Added vfs_unlink call to ensure vfs is used on unlink from client.Jeremy Allison2000-08-301-1/+1
| | | | Jeremy.
* smbd/password.c: Fixed typo in Tim's new code that caused insure overrun error.Jeremy Allison2000-08-281-2/+2
| | | | | smbd/reply.c: Fixed lowercasing UNIX character set problem. Jeremy.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-011-29/+18
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* Added some error checking and returns to the new 'move' code.Jeremy Allison2000-07-251-0/+2
| | | | Jeremy.
* A rather big change set ! (listed in no particular order)Jean-François Micouleau2000-07-251-8/+20
| | | | | | | | | | | | | | | | | | | | | - 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.
* Luke, I am moving the code back into passdb/passdb.c, this the correctJeremy Allison2000-06-091-3/+1
| | | | | | | | | | | | | 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.
* reverted jeremy's changes that removed NET_USER_INFO_3. will you pleaseLuke Leighton2000-06-091-1/+3
| | | | not just undercut work in progress, thank you.
* include/smb.h: Removed NET_USER_3 struct from user struct. It doesn't belong ↵Jeremy Allison2000-06-081-3/+1
| | | | | | | | | | | | | 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.
* added a NET_USER_INFO_3 struct to user_struct.Luke Leighton2000-06-081-1/+4
| | | | register_vuid fills it with constructed info.
* Did a proper fix for the file access on IPC$. Denied all pipe opens onJeremy Allison2000-05-231-2/+6
| | | | | trans2 open calls as we don't have the pipe open response coded up yet. Jeremy.
* Fixed bug where file access was allowed on IPC$ share.Jeremy Allison2000-05-231-3/+3
| | | | | Return correct error codes on invalid share name. Jeremy.
* passdb/secrets.c: Fix typo in comment.Jeremy Allison2000-05-151-5/+0
| | | | | | | | rpc_server/srv_pipe.c: Use accessor functions rather than diddling with structure internals directly. smbd/process.c: smbd/reply.c: Remove READ_PREDICTION #ifdefs. Jeremy.
* use "winbind separator" option for domain/user separator characterAndrew Tridgell2000-05-121-1/+1
|
* fixed a problem with appliance operationAndrew Tridgell2000-05-121-2/+2
|
* - changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell2000-05-101-8/+19
| | | | - finished ntdom -> winbind rename in head
* more merging voodooAndrew Tridgell2000-05-101-0/+2
| | | | | | this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done
* Fix for misunderstanding of fsync added when vfs layerHerb Lewis2000-05-101-7/+7
| | | | | was done. Samba was doing fsync's (bleagh). Jeremy.
* - use smb_gwtpwnam() in another couple of placesAndrew Tridgell2000-05-091-7/+9
| | | | - don't call add/del user if the scripts are empty
* added secrets.tdb and changed storage of trust account password to useAndrew Tridgell2000-05-081-8/+1
| | | | it
* a minimal change to get appliance mode to work with winbinddAndrew Tridgell2000-05-041-3/+3
| | | | | | | | | we needed to accept usernames of the form DOMAIN/user, which means we needed to pass the domain to a getpwnam() like routine in certain critical spots. What I'd rather do is get rid of "char *user" everywhere and use the new userdom_struct, but that will have to wait a few days.
* fixed dptr_wcard handling (need to use strdup)Andrew Tridgell2000-04-301-1/+1
|
* removed more cruft from our old wildcard matching codeAndrew Tridgell2000-04-301-37/+0
|
* fixed our smbsearch code. We now store the mask with the dptr, thisAndrew Tridgell2000-04-301-22/+8
| | | | | | turns out to be essential for a correct implementation (there ins't enough room to store all possible masks in the status return structure!)
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-301-9/+6
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* Fixed range check on writeX.Jeremy Allison2000-04-271-1/+4
| | | | Jeremy.
* Tidyup of smbecho.Jeremy Allison2000-04-271-2/+4
| | | | Jeremy.
* moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell2000-04-251-2/+0
|
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-241-1/+1
| | | | | | | | | | | | 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.
* fixed overlapping strcpy() found by insureAndrew Tridgell2000-04-221-9/+6
|
* This is a *big* checkin that may break some things, but implements theJeremy Allison2000-04-221-50/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* the changes to the main smb codeAndrew Tridgell2000-04-161-6/+6
| | | | | | | | | | | | | | | | | | | | | ------------ 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.
* Implmented mapping of lock offset/count from 64 bit MS rangesJeremy Allison2000-04-121-1/+1
| | | | | | to either 63 or 31 bit POSIX ranges. Code to get these locks not yet added. Jeremy.
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-105/+53
| | | | | | | | | | | | 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.
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-13/+12
| | | | | | | | | | | | | | | | 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.
* the bulk of the changes to get rid of fd_ptr and move print openAndrew Tridgell2000-04-101-103/+28
| | | | | | | | | handling to printing/printing.c most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd the changes in open.c are quite dramatic. Most of it is removing all the functions that handled the fd multiplexing
* More Japanese filename fixes wrt VFS code fromTim Potter2000-03-291-6/+9
| | | | Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp>
* include/smb.h:Jeremy Allison2000-03-131-5/+5
| | | | | | | | 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.
* dded Microsoft Dfs services.Shirish Kalele2000-03-081-1/+34
| | | | | | | | | | | | | | | | | * 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 ----------------------------------------------------------------------
* Put back lots of missing calls to dos_to_unix(). Thanks toTim Potter2000-02-031-19/+22
| | | | aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
* Mega-VFS merge. Yeah baby!Tim Potter2000-02-031-58/+62
| | | | | Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct.
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-1/+1
| | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy.
* Added "inherit permissions" patch.Jeremy Allison2000-01-141-7/+12
| | | | | Fixed locking bug found by Andrew. Jeremy.
* changes to reflect the new syntax of the locking calls.Andrew Tridgell2000-01-131-15/+14
|
* first cut at using the tdb code for the connections structure, theAndrew Tridgell1999-12-211-1/+1
| | | | | SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago!
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-718/+1111
|
* changed function name of get_home_dir() to get_unixhome_dir(), to stopLuke Leighton1999-12-121-1/+1
| | | | | | | clash with gnu readline library. fixed issue with [homes] service not being there - call lp_add_home() just before starting the msrpc processing.
* final part of "first" phase converting over to msrpc daemon architecture.Luke Leighton1999-12-121-35/+3
| | | | | | | | | | | | done a minimal amout of clean-up in the Makefile, removing unnecessary modules from the link stage. this is not complete, yet, and will involve some changes, for example to smbd, to remove dependencies on the password database API that shouldn't be there. for example, smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa API. this first implementation has minor problems with not reinstantiating the same services as the caller. the "homes" service is a good example.
* the first independent msrpc daemon - lsarpcd.Luke Leighton1999-12-061-2/+3
| | | | | | | | | | | | | | | one horrible cut / paste job from smbd, plus a code split of shared components between the two. the job is not _yet_ complete, as i need to be able to do a become_user() call for security reasons. i picked lsarpcd first because you don't _need_ security on it (microsoft botched so badly on this one, it's not real. at least they fixed this in nt5 with restrictanonymous=0x2). fixing this involves sending the current smb and unix credentials down the unix pipe so that the daemon it eventually goes to can pick them up at the other end. i can't believe this all worked!!!