summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2011-02-26dirfd doesn't exist in some platforms.Jeremy Allison1-0/+6
Hack that should get the buildfarm back to green. Ensure dirfd() needs to be defined before we properly return fdopendir. This will do until we get a proper dirfd() defined in libreplace. From http://www.gnu.org/software/hello/manual/gnulib/dirfd.html This function is missing on some platforms: AIX 7.1, HP-UX 11, OSF/1 5.1, Solaris 10, mingw. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 26 04:19:55 CET 2011 on sn-devel-104
2011-02-25Detect Mac OS X as a separate client type.Justin Maggard1-0/+4
2011-02-25Ensure we don't return an incorrect access mask.Jeremy Allison1-1/+2
From the Microsoft test suite @ Connectathon: Test Case: TestSuite_ScenarioNo009GrantedAccessTestS0 File created with access = 0x7 (Read, Write, Delete) Query Info on file returns 0x87 (Read, Write, Delete, Read Attributes) Jeremy.
2011-02-25Implement the SMB2 close flag SMB2_CLOSE_FLAGS_FULL_INFORMATION (and move ↵Jeremy Allison1-20/+75
definition to correct place). Thanks to Nick Meier @ Microsoft for finding this @ Connectathon. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Feb 25 00:40:52 CET 2011 on sn-devel-104
2011-02-24Batch oplocks conflict with exclusive as well as themselves.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 24 21:44:50 CET 2011 on sn-devel-104
2011-02-24Remember to free the second temporary string.Jeremy Allison1-0/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 24 04:17:49 CET 2011 on sn-devel-104
2011-02-23Fix bug 7950 - Samba 3.5.x fails BASE-CREATEX_SHAREMODES_DIR smbtorture4 testJeremy Allison1-6/+16
We need to revalidate the pathname once re-constructed from a root fsp. Jeremy.
2011-02-23Fix bug found against the new Mac client @ Connectathon. Mac clientsJeremy Allison1-1/+9
don't open with FILE_WRITE_ATTRIBUTES when just doing a write, so updating the write time on close fails as smb_set_file_time() now (correctly) checks for FILE_WRITE_ATTRIBUTES in the access_mask before allowing client time update. This is an internal time update being done on a close, not a handle-based client request.
2011-02-22s3-printing: only include printing where really needed.Günther Deschner4-0/+4
Guenther
2011-02-22s3-printing: fix pcacp prototypes and includes.Günther Deschner3-0/+3
Guenther
2011-02-22s3-printing: isolate print notification prototypes better.Günther Deschner1-0/+1
Guenther
2011-02-22s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett20-259/+259
These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-21s3-rpc_server: Rename srv_rpc_register.c.Andreas Schneider1-1/+1
2011-02-21s3-rpc_server: Rename srv_rpc_register.Andreas Schneider1-1/+1
2011-02-21s3-rpc_server: Pass tevent_context to dcerpc endpoints.Andreas Schneider1-1/+1
2011-02-20s3: Convert init_system_info to NTSTATUSVolker Lendecke1-2/+4
2011-02-20s3: Fix some nonempty blank linesVolker Lendecke1-6/+6
2011-02-17s3-cluster Always fill in the clustering vnn elementAndrew Bartlett1-4/+0
This avoids this structure being partially uninitialised. Adnrew Bartlett
2011-02-17s3: increase the log level for missing PIDs on SIGCHLDDavid Disseldorp1-1/+2
Since the fix for bso#7836, the parent smbd is responsible for maintaining an up-to-date printcap cache. It does this by forking a child process to asynchronously fetch printcap data from CUPS. When the child process exits after fetching all printcap data, the parent smbd is sent SIGCHLD. This triggers smbd_sig_chld_handler() which looks for the exited process PID on a "children" list. Child smbd process PIDs are added to the "children" list to ensure cleanup on unclean shutdown and log level change notification messages. Printcap update process PIDs are not added to the list as they do not maintain any state that requires cleanup, nor do they wait on tevent for messages. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Feb 17 11:11:45 CET 2011 on sn-devel-104
2011-02-11s3: Avoid a select call per smbVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Feb 11 12:13:54 CET 2011 on sn-devel-104
2011-02-10s3:smbd: fix switch indentation level in get_ea_dos_attribute()Michael Adam1-4/+4
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Feb 10 17:46:12 CET 2011 on sn-devel-104
2011-02-10s3-auth Rename cryptic 'ptok' to security_tokenAndrew Bartlett6-26/+26
This will allow the auth_serversupplied_info struct to be migrated to auth_session_info easier. Adnrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10Put OpenDir() back the way it was - don't overload with an fsp arg. Create ↵Jeremy Allison4-20/+64
OpenDir_fsp for new usage. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 10 02:43:31 CET 2011 on sn-devel-104
2011-02-10Make it clear we're using the open file pathname.Jeremy Allison1-6/+4
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 10 01:06:29 CET 2011 on sn-devel-104
2011-02-09Allow SMB2_FIND to actually use the open fd handle if we support fdopendir. ↵Jeremy Allison6-16/+52
Fallback to pathname opendir if not.
2011-02-09Oops. Need to test for if(!NT_STATUS_IS_OK(..)) for error.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 22:06:05 CET 2011 on sn-devel-104
2011-02-09Move to opening an fd on directory opens. Get more careful about symlink races.Jeremy Allison1-1/+37
2011-02-09Remove unneeded stat call.Jeremy Allison1-9/+4
2011-02-09Add fdopendir to the VFS. We will use this to reuse a directory fd already ↵Jeremy Allison1-0/+9
open by NtCreateX. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
2011-02-08Pass fsp to dptr_CloseDir(). Cope with setting the fd if we're closing an fd ↵Jeremy Allison4-11/+13
that opendir knows about.
2011-02-08If possible (O_DIRECTORY exists) open an fd for a directory open.Jeremy Allison5-16/+23
Start of the move towards handle-based code for directory access. Currently makes fstat/fchown code work for directories rather than falling back to pathnames. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 8 06:34:41 CET 2011 on sn-devel-104
2011-02-08Use corrcet function instead of cut-and-paste code.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 8 03:23:40 CET 2011 on sn-devel-104
2011-02-07Fix leak in error path.Jeremy Allison1-0/+1
2011-02-06s3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2011-02-05Fix try_chown code. Use new vfs_chown_fsp() which always trys fd first.Jeremy Allison2-75/+72
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 03:33:59 CET 2011 on sn-devel-104
2011-02-05Move the "oplock file with byte range locks" check to the correct place, ↵Jeremy Allison2-17/+15
where we're making oplock decisions. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 01:18:14 CET 2011 on sn-devel-104
2011-02-02s3-smbd: Added a function to setup rpc services.Andreas Schneider1-90/+2
Move the complete setup of the rpc service to its own file and use callbacks to register at the endpoint mapper.
2011-02-02s3-epmapper: Added a endpoint mapper skeleton.Andreas Schneider1-0/+1
2011-02-02Based on a conversation with Volker, refactor some of the oplock code to ↵Jeremy Allison1-71/+160
make it comprehensible. delay_for_oplocks() did 4 things. 1). Validation of existing oplock types. 2). Check for compatibility with batch oplocks (pass 1). 3). Check for compatibility with exclusive oplocks (pass 2). 4). Set the correct oplock type from the requested value. Refactor into 4 separate functions: 1). find_oplock_types() - does validation of oplock types and returns pointers to specific values. 2). delay_for_batch_oplocks() - the pass 1 phase above. 3). delay_for_exclusive_oplocks() - the pass 2 phase above 4). grant_fsp_oplock_type() - Set the correct oplock type from the requested value. Now separated out this code should be much easier to understand and modify. This also fixes an erroneous SMB_ASSERT which was hidden by the previous complexity of the single delay_for_oplocks() code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 2 01:52:21 CET 2011 on sn-devel-104
2011-02-01s3-lanman: prefer dcerpc_samr_X functions.Günther Deschner1-83/+237
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Feb 1 16:45:10 CET 2011 on sn-devel-104
2011-02-01Ensure we send the direct levelII oplock break to the correct fid.Pavel Shilovsky1-1/+10
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 1 00:39:56 CET 2011 on sn-devel-104
2011-01-31Fix bug #7928 - Samba problems with kernel oplocks option set to "no"Pavel Shilovsky2-8/+32
We should not grant levelII oplocks on a file with existing byte range locks.
2011-01-31s3:smbd: let smbd_server_connection_loop_once() check for select errorsStefan Metzmacher1-0/+4
metze
2011-01-31Revert "s3: Fix starving the echo responder"Stefan Metzmacher1-17/+0
This reverts commit d5cf6482ed0cd9a11448ca04944b2e01200a7c89. I'll add a more generic fix for this problem. metze
2011-01-31Revert "s3:events: Call all ready fd event handlers on each iteration of the ↵Stefan Metzmacher1-18/+21
main loop" This reverts commit 455fccf86b6544cd17a2571c63a88f8aebff3f74. I'll add a more generic fix for this problem. metze
2011-01-28We need to reply to SMB2_GETINFO_FILE with a class of ↵Jeremy Allison1-1/+32
SMB2_FILE_STANDARD_INFO on an IPC$ share. Otherwise a Win7 client issues this request twice (2xroundtrips) if we return NOT_SUPPORTED. We do the same for SMB1 in call_trans2qpipeinfo() Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 28 22:53:18 CET 2011 on sn-devel-104
2011-01-27Change "security=share" to downgrade to SMB1 from SMB2, rather than trying ↵Jeremy Allison1-8/+0
to fake it.
2011-01-27Looking into printer driver issues, I ran across some peculiarities inDavid Disseldorp1-8/+11
copy_file(): - Firstly, if the source file is zero bytes, NT_STATUS_DISK_FULL is returned. - Secondly, the conditional lseek is confusing. It fires when OPENX_FILE_EXISTS_OPEN is set and I can't see why the lseek is necessary in this case. - Finally, the lseek error path also results in NT_STATUS_DISK_FULL. Proposed fix for first and third point below. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jan 27 00:59:56 CET 2011 on sn-devel-104
2011-01-26Allow "security = share" with SMB2. We already handle this in smb2/smb2_server.cJeremy Allison1-1/+0
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jan 26 20:37:29 CET 2011 on sn-devel-104
2011-01-25Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved.Jeremy Allison5-36/+78
Do this by keeping a linked list of delete on close tokens, one for each filename that identifies a path to the dev/inode. Use the jenkins hash of the pathname to identify the correct token.