mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
https://gitlab.com/samba-team/samba is the Official GitLab mirror of https://git.samba.org/samba.git -- Merge requests should be made on GitLab (not on GitHub)
6259f51dd9
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.
(This used to be commit
|
||
---|---|---|
docs | ||
examples | ||
packaging | ||
source3 | ||
swat | ||
COPYING | ||
Manifest | ||
Read-Manifest-Now | ||
README | ||
Roadmap | ||
WHATSNEW.txt |
This is version 2.0.X of Samba, the free SMB and CIFS client and server for unix and other operating systems. Samba is maintained by the Samba Team, who support the original author, Andrew Tridgell. >>>> Please read THE WHOLE of this file as it gives important information >>>> about the configuration and use of Samba. NOTE: Installation instructions may be found in docs/textdocs/UNIX_INSTALL.txt This software is freely distributable under the GNU public license, a copy of which you should have received with this software (in a file called COPYING). WHAT IS SMB? ============ This is a big question. The very short answer is that it is the protocol by which a lot of PC-related machines share files and printers and other informatiuon such as lists of available files and printers. Operating systems that support this natively include Windows NT, OS/2, and Linux and add on packages that achieve the same thing are available for DOS, Windows, VMS, Unix of all kinds, MVS, and more. Apple Macs and some Web Browsers can speak this protocol as well. Alternatives to SMB include Netware, NFS, Appletalk, Banyan Vines, Decnet etc; many of these have advantages but none are both public specifications and widely implemented in desktop machines by default. The Common Internet Filesystem (CIFS) is what the new SMB initiative is called. For details watch http://samba.org/cifs. WHY DO PEOPLE WANT TO USE SMB? ============================== 1. Many people want to integrate their Microsoft or IBM style desktop machines with their Unix or VMS (etc) servers. 2. Others want to integrate their Microsoft (etc) servers with Unix or VMS (etc) servers. This is a different problem to integrating desktop clients. 3. Others want to replace protocols like NFS, DecNet and Novell NCP, especially when used with PCs. WHAT CAN SAMBA DO? ================== Here is a very short list of what samba includes, and what it does. For many networks this can be simply summarised by "Samba provides a complete replacement for Windows NT, Warp, NFS or Netware servers." - a SMB server, to provide Windows NT and LAN Manager-style file and print services to SMB clients such as Windows 95, Warp Server, smbfs and others. - a NetBIOS (rfc1001/1002) nameserver, which amongst other things gives browsing support. Samba can be the master browser on your LAN if you wish. - a ftp-like SMB client so you can access PC resources (disks and printers) from unix, Netware and other operating systems - a tar extension to the client for backing up PCs - limited command-line tool that supports some of the NT administrative functionality, which can be used on Samba, NT workstation and NT server. For a much better overview have a look at the web site at http://samba.org/samba, and browse the user survey. Related packages include: - smbfs, a linux-only filesystem allowing you to mount remote SMB filesystems from PCs on your linux box. This is included as standard with Linux 2.0 and later. - tcpdump-smb, a extension to tcpdump to allow you to investigate SMB networking problems over netbeui and tcp/ip. - smblib, a library of smb functions which are designed to make it easy to smb-ise any particular application. See ftp://samba.org/pub/samba/smblib. CONTRIBUTIONS ============= If you want to contribute to the development of the software then please join the mailing list. The Samba team accepts patches (preferably in "diff -u" format, see docs/BUGS.txt for more details) and are always glad to receive feedback or suggestions to the address samba-bugs@samba.org. We have recently put a new bug tracking system into place which should help the throughput quite a lot. You can also get the Samba sourcecode straight from the CVS tree - see http://samba.org/cvs.html. You could also send hardware/software/money/jewelry or pizza vouchers directly to Andrew. The pizza vouchers would be especially welcome, in fact there is a special field in the survey for people who have paid up their pizza :-) If you like a particular feature then look through the CVS change-log (on the web at http://samba.org/cgi-bin/cvsweb/samba) and see who added it, then send them an email. Remember that free software of this kind lives or dies by the response we get. If noone tells us they like it then we'll probably move onto something else. However, as you can see from the user survey quite a lot of people do seem to like it at the moment :-) Andrew Tridgell Email: samba-bugs@samba.org 3 Ballow Crescent Macgregor, A.C.T. 2615 Australia Samba Team Email: samba-bugs@samba.org MORE INFO ========= DOCUMENTATION ------------- There is quite a bit of documentation included with the package, including man pages, and lots of .txt files with hints and useful info. This is also available from the web page. There is a growing collection of information under docs/faq; by the next release expect this to be the default starting point. A list of Samba documentation in languages other than English is available on the web page. If you would like to help with the documentation (and we _need_ help!) then have a look at the mailing list samba-docs, archived at http://lists.samba.org/ MAILING LIST ------------ There is a mailing list for discussion of Samba. To subscribe send mail to listproc@samba.org with a body of "subscribe samba Your Name" Please do NOT send this request to the list alias instead. To send mail to everyone on the list mail to samba@listproc.anu.edu.au There is also an announcement mailing list where new versions are announced. To subscribe send mail to listproc@samba.org with a body of "subscribe samba-announce Your Name". All announcements also go to the samba list. For details of other Samba mailing lists and for access to archives, see http://lists.samba.org/ NEWS GROUP ---------- You might also like to look at the usenet news group comp.protocols.smb as it often contains lots of useful info and is frequented by lots of Samba users. The newsgroup was initially setup by people on the Samba mailing list. It is not, however, exclusive to Samba, it is a forum for discussing the SMB protocol (which Samba implements). The samba list is gatewayed to this newsgroup. WEB SITE -------- A Samba WWW site has been setup with lots of useful info. Connect to: http://samba.org/samba/ As well as general information and documentation, this also has searchable archives of the mailing list and a user survey that shows who else is using this package. Have you registered with the survey yet? :-)