mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
8d00b0e664
This is more lines of code, but it's still a simplification. With this patch we don't call the full openat_pathref_fsp() anymore when looking up the last component in filename_convert_dirfsp(), instead we do the direct SMB_VFS_OPENAT(). We don't need the whole complexity of non_widelink_open() for this case, we do know that we have a real non-cwd dirfsp. The other big change that is not obvious just from looking at the patch: This removes the special case for looking up posix symlinks. Before this patch, filename_convert_dirfsp() returned a proper smb_filename but without an attached fsp when a smb1 posix client hits a symlink. This caused all sorts of special case code everywhere. For example smbd_do_qfilepathinfo() needs to cover both cases just for the smb1 posix symlink case. This special-case handling can go now. We can do the path lookup in the smb1-only qpathinfo code and call into the common code with a proper fsp. When hitting a symlink and with O_PATH available, we'll get the symlink opened with an O_PATH fd. Without O_PATH we obviously can't do that, there we get fd=-1 and an indication that we don't have the procfd fallback around. Why all this? I want to present FIFOs (and eventually symlinks) as reparse points as the very next step. Without this patch, there is no real unified way to get the file attributes from disk. Now we can use the proper logic of fdos_mode() everywhere and not rely on special cases for fsp==NULL. This patch also changes some error codes for smb1 posix extensions. I chose to just change the test instead of going after each and every change. As long as we do get an error, I'm willing to accept that we slightly change error path behaviour for this deprecated code. And, I tried to split this up into smaller patches but I failed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> |
||
---|---|---|
.. | ||
tests | ||
count_80_col.pl | ||
creategroup | ||
fix_bool.pl | ||
format_indent.sh | ||
makeunicodecasemap.awk | ||
mknissmbpasswd.sh | ||
mknissmbpwdtbl.sh | ||
mksmbpasswd.sh | ||
mksyms.awk | ||
mksyms.sh | ||
samba-log-parser | ||
scancvslog.pl | ||
smbaddshare | ||
smbchangeshare | ||
smbdeleteshare | ||
smbtar | ||
strip_trail_ws.pl | ||
updatesmbpasswd.sh | ||
wscript_build |