SHA256
1
0
forked from pool/tigervnc
tigervnc/U_include-vencrypt-only-if-any-subtype-present.patch
Michal Srb f8d64d14e7 Accepting request 243583 from home:michalsrb:branches:X11:XOrg
- U_include-vencrypt-only-if-any-subtype-present.patch
  * Do not automatically offer VeNCrypt security if none of it's
    subtypes is selected. (bnc#889781)

OBS-URL: https://build.opensuse.org/request/show/243583
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=34
2014-08-04 10:55:13 +00:00

23 lines
620 B
Diff

Index: common/rfb/Security.cxx
===================================================================
--- common/rfb/Security.cxx (revision 5186)
+++ common/rfb/Security.cxx (working copy)
@@ -71,10 +71,15 @@
list<rdr::U8> result;
list<U32>::iterator i;
- result.push_back(secTypeVeNCrypt);
+ bool VeNCryptPresent = false;
for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
- if (*i < 0x100)
+ if (*i < 0x100) {
result.push_back(*i);
+ } else {
+ if(!VeNCryptPresent)
+ result.push_back(secTypeVeNCrypt);
+ VeNCryptPresent = true;
+ }
return result;
}