Changeset 736 for branches/samba-3.5.x/source3/smbd
- Timestamp:
- Nov 12, 2012, 5:38:52 PM (13 years ago)
- Location:
- branches/samba-3.5.x/source3/smbd
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source3/smbd/notify.c
r590 r736 367 367 } 368 368 369 static void notify_parent_dir(connection_struct *conn, 370 uint32 action, uint32 filter, 371 const char *path) 372 { 373 struct smb_filename smb_fname_parent; 374 char *parent; 375 const char *name; 376 char *oldwd; 377 378 if (!parent_dirname(talloc_tos(), path, &parent, &name)) { 379 DEBUG(1, ("Can't get parent dirname, giving up\n")); 380 return; 381 } 382 383 ZERO_STRUCT(smb_fname_parent); 384 smb_fname_parent.base_name = parent; 385 386 oldwd = vfs_GetWd(parent, conn); 387 if (oldwd == NULL) { 388 DEBUG(1, ("vfs_GetWd failed!\n")); 389 goto done; 390 } 391 if (vfs_ChDir(conn, conn->connectpath) == -1) { 392 DEBUG(1, ("Could not chdir to connect path!\n")); 393 goto done; 394 } 395 396 if (SMB_VFS_STAT(conn, &smb_fname_parent) == -1) { 397 goto chdir_done; 398 } 399 400 notify_onelevel(conn->notify_ctx, action, filter, 401 SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st), 402 name); 403 chdir_done: 404 vfs_ChDir(conn, oldwd); 405 done: 406 TALLOC_FREE(parent); 407 } 408 369 409 void notify_fname(connection_struct *conn, uint32 action, uint32 filter, 370 410 const char *path) 371 411 { 372 char *fullpath; 373 char *parent; 374 const char *name; 412 char *fullpath = NULL; 375 413 376 414 if (path[0] == '.' && path[1] == '/') { 377 415 path += 2; 378 416 } 379 if (parent_dirname(talloc_tos(), path, &parent, &name)) { 380 struct smb_filename smb_fname_parent; 381 382 ZERO_STRUCT(smb_fname_parent); 383 smb_fname_parent.base_name = parent; 384 385 if (SMB_VFS_STAT(conn, &smb_fname_parent) != -1) { 386 notify_onelevel(conn->notify_ctx, action, filter, 387 SMB_VFS_FILE_ID_CREATE(conn, &smb_fname_parent.st), 388 name); 389 } 390 } 417 notify_parent_dir(conn, action, filter, path); 391 418 392 419 fullpath = talloc_asprintf(talloc_tos(), "%s/%s", conn->connectpath, -
branches/samba-3.5.x/source3/smbd/nttrans.c
r733 r736 133 133 total_sent_thistime + alignment_offset 134 134 + data_alignment_offset); 135 136 /*137 * We might have had SMBnttranss in req->inbuf, fix that.138 */139 SCVAL(req->outbuf, smb_com, SMBnttrans);140 135 141 136 /* … … 3069 3064 show_msg((char *)req->inbuf); 3070 3065 3066 /* Windows clients expect all replies to 3067 an NT transact secondary (SMBnttranss 0xA1) 3068 to have a command code of NT transact 3069 (SMBnttrans 0xA0). See bug #8989 for details. */ 3070 req->cmd = SMBnttrans; 3071 3071 3072 if (req->wct < 18) { 3072 3073 reply_nterror(req, NT_STATUS_INVALID_PARAMETER); -
branches/samba-3.5.x/source3/smbd/open.c
r733 r736 2297 2297 SMB_ASSERT(!is_ntfs_stream_smb_fname(smb_dname)); 2298 2298 2299 /* Ensure we have a directory attribute. */ 2300 file_attributes |= FILE_ATTRIBUTE_DIRECTORY; 2299 if (!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) { 2300 /* Ensure we have a directory attribute. */ 2301 file_attributes |= FILE_ATTRIBUTE_DIRECTORY; 2302 } 2301 2303 2302 2304 DEBUG(5,("open_directory: opening directory %s, access_mask = 0x%x, " -
branches/samba-3.5.x/source3/smbd/oplock_linux.c
r414 r736 75 75 int ret; 76 76 77 /* First set the signal handler. */ 78 if (linux_set_lease_sighandler(fd) == -1) { 79 return -1; 80 } 77 81 ret = fcntl(fd, F_SETLEASE, leasetype); 78 82 if (ret == -1 && errno == EACCES) { 79 83 set_effective_capability(LEASE_CAPABILITY); 84 /* 85 * Bug 8974 - work around Linux kernel bug 86 * https://bugzilla.kernel.org/show_bug.cgi?id=43336. 87 * "fcntl(F_SETLEASE) resets signal number when 88 * called multiple times" 89 */ 90 if (linux_set_lease_sighandler(fd) == -1) { 91 return -1; 92 } 80 93 ret = fcntl(fd, F_SETLEASE, leasetype); 81 94 } -
branches/samba-3.5.x/source3/smbd/server.c
r668 r736 804 804 test = False; 805 805 } 806 TALLOC_FREE(fname); 806 807 } 807 808 -
branches/samba-3.5.x/source3/smbd/service.c
r480 r736 751 751 return NULL; 752 752 } 753 754 /* We don't want to replace the original sanitized_username 755 as it is the original user given in the connect attempt. 756 This is used in '%U' substitutions. */ 757 TALLOC_FREE(forced_serverinfo->sanitized_username); 758 forced_serverinfo->sanitized_username = 759 talloc_move(forced_serverinfo, 760 &conn->server_info->sanitized_username); 753 761 754 762 TALLOC_FREE(conn->server_info); -
branches/samba-3.5.x/source3/smbd/trans2.c
r733 r736 862 862 reply_outbuf(req, 10, total_sent_thistime + alignment_offset 863 863 + data_alignment_offset); 864 865 /*866 * We might have SMBtrans2s in req which was transferred to867 * the outbuf, fix that.868 */869 SCVAL(req->outbuf, smb_com, SMBtrans2);870 864 871 865 /* Set total params and data to be sent */ … … 8585 8579 show_msg((char *)req->inbuf); 8586 8580 8581 /* Windows clients expect all replies to 8582 a transact secondary (SMBtranss2 0x33) 8583 to have a command code of transact 8584 (SMBtrans2 0x32). See bug #8989 8585 and also [MS-CIFS] section 2.2.4.47.2 8586 for details. 8587 */ 8588 req->cmd = SMBtrans2; 8589 8587 8590 if (req->wct < 8) { 8588 8591 reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
Note:
See TracChangeset
for help on using the changeset viewer.