aboutsummaryrefslogtreecommitdiff
path: root/tools/plink/winsecur.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/plink/winsecur.c')
-rw-r--r--tools/plink/winsecur.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/plink/winsecur.c b/tools/plink/winsecur.c
index d04e88a92..df93a74c5 100644
--- a/tools/plink/winsecur.c
+++ b/tools/plink/winsecur.c
@@ -187,6 +187,12 @@ int make_private_security_descriptor(DWORD permissions,
goto cleanup;
}
+ if (!SetSecurityDescriptorOwner(*psd, usersid, FALSE)) {
+ *error = dupprintf("unable to set owner in security descriptor: %s",
+ win_strerror(GetLastError()));
+ goto cleanup;
+ }
+
if (!SetSecurityDescriptorDacl(*psd, TRUE, *acl, FALSE)) {
*error = dupprintf("unable to set DACL in security descriptor: %s",
win_strerror(GetLastError()));