|
Lines 80-85
Link Here
|
| 80 |
m_unattendedPassword = password; |
80 |
m_unattendedPassword = password; |
| 81 |
} |
81 |
} |
| 82 |
|
82 |
|
|
|
83 |
bool InvitationsRfbServer::enableSharing() const |
| 84 |
{ |
| 85 |
return m_enableSharing; |
| 86 |
} |
| 87 |
|
| 83 |
bool InvitationsRfbServer::allowUnattendedAccess() const |
88 |
bool InvitationsRfbServer::allowUnattendedAccess() const |
| 84 |
{ |
89 |
{ |
| 85 |
return m_allowUnattendedAccess; |
90 |
return m_allowUnattendedAccess; |
|
Lines 102-107
Link Here
|
| 102 |
RfbServer::stop(disconnectClients); |
107 |
RfbServer::stop(disconnectClients); |
| 103 |
} |
108 |
} |
| 104 |
|
109 |
|
|
|
110 |
void InvitationsRfbServer::toggleSharing(bool allow) |
| 111 |
{ |
| 112 |
m_enableSharing = allow; |
| 113 |
} |
| 114 |
|
| 105 |
void InvitationsRfbServer::toggleUnattendedAccess(bool allow) |
115 |
void InvitationsRfbServer::toggleUnattendedAccess(bool allow) |
| 106 |
{ |
116 |
{ |
| 107 |
m_allowUnattendedAccess = allow; |
117 |
m_allowUnattendedAccess = allow; |
|
Lines 113-118
Link Here
|
| 113 |
m_unattendedPassword = readableRandomString(4)+"-"+readableRandomString(3); |
123 |
m_unattendedPassword = readableRandomString(4)+"-"+readableRandomString(3); |
| 114 |
KSharedConfigPtr config = KGlobal::config(); |
124 |
KSharedConfigPtr config = KGlobal::config(); |
| 115 |
KConfigGroup krfbConfig(config,"Security"); |
125 |
KConfigGroup krfbConfig(config,"Security"); |
|
|
126 |
m_enableSharing = krfbConfig.readEntry( |
| 127 |
"enableSharing", QVariant(false)).toBool(); |
| 116 |
m_allowUnattendedAccess = krfbConfig.readEntry( |
128 |
m_allowUnattendedAccess = krfbConfig.readEntry( |
| 117 |
"allowUnattendedAccess", QVariant(false)).toBool(); |
129 |
"allowUnattendedAccess", QVariant(false)).toBool(); |
| 118 |
} |
130 |
} |
|
Lines 122-127
Link Here
|
| 122 |
stop(); |
134 |
stop(); |
| 123 |
KSharedConfigPtr config = KGlobal::config(); |
135 |
KSharedConfigPtr config = KGlobal::config(); |
| 124 |
KConfigGroup krfbConfig(config,"Security"); |
136 |
KConfigGroup krfbConfig(config,"Security"); |
|
|
137 |
krfbConfig.writeEntry("enableSharing",m_enableSharing); |
| 125 |
krfbConfig.writeEntry("allowUnattendedAccess",m_allowUnattendedAccess); |
138 |
krfbConfig.writeEntry("allowUnattendedAccess",m_allowUnattendedAccess); |
| 126 |
if(m_wallet && m_wallet->isOpen()) { |
139 |
if(m_wallet && m_wallet->isOpen()) { |
| 127 |
|
140 |
|
|
Lines 138-143
Link Here
|
| 138 |
KStringHandler::obscure(m_desktopPassword)); |
151 |
KStringHandler::obscure(m_desktopPassword)); |
| 139 |
krfbConfig.writeEntry("unattendedPassword", |
152 |
krfbConfig.writeEntry("unattendedPassword", |
| 140 |
KStringHandler::obscure(m_unattendedPassword)); |
153 |
KStringHandler::obscure(m_unattendedPassword)); |
|
|
154 |
krfbConfig.writeEntry("enableSharing", |
| 155 |
m_enableSharing); |
| 141 |
krfbConfig.writeEntry("allowUnattendedAccess", |
156 |
krfbConfig.writeEntry("allowUnattendedAccess", |
| 142 |
m_allowUnattendedAccess); |
157 |
m_allowUnattendedAccess); |
| 143 |
} |
158 |
} |