-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add motw to scp and sftp #614
add motw to scp and sftp #614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -2074,6 +2083,12 @@ sink(int argc, char **argv, const char *src) | |||
omode = mode; | |||
mode |= S_IWUSR; | |||
#ifdef WINDOWS | |||
if (add_mark_of_web(np) == -1) { | |||
if (verbose_mode) { | |||
note_err("%s: add_mark_of_web failed\n", np); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this message handled differently than in sftp-client.c/sftp-server.c (where is uses debug
instead of note_err
)?
|
||
int ofd, status = 0; | ||
char* zoneIdentifierStr = NULL; | ||
size_t zoneIndentifierLen = strlen("[ZoneTransfer]\nZoneId=") + 1 + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a typo in zoneIndentifierLen
, it should be zoneIdentifierLen
.
PR Summary
address PowerShell/Win32-OpenSSH#1964
PR Context
Add mark of the web for files transferred via scp & sftp to address bypassing protected view for Office files. For scp and the sftp server, if adding the mark of the web fails, file transfer will fail. For the sftp client, if adding the mark of the web fails, the transferred file will be removed.