Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 3 contributors
Commits on Jul 11, 2012
Will Dietz dtzWill Apply woce-build's 'sysmgr.patch': Fixup warnings and remove pkgconfi…
…g dep.
3b1c171
cryptk cryptk Fixing readme.md
Signed-off-by: Chris Jowett <cryptk@gmail.com>
84b79b3
Commits on Jul 13, 2012
pcworld pcworld Fixed bug#1 (http://issues.webos-ports.org/issues/1):
Now detects if the encrypted passcode is base 64. If it is, forces the user to set a new PIN/password.

Signed-off-by: Will Dietz <w@wdtz.org>
9fc9475
10 README.md
View
@@ -0,0 +1,10 @@
+LunaSysMgr
+==========
+
+LunaSysMgr
+
+For version 3.0.5 of webOS
+
+Instructions: http://webos-ports.org/wiki/WOCE_build_Instructions
+
+Project Homepage: http://webos-ports.org Bug Tracker: http://issues.webos-ports.org IRC: freenode:#webos-ports
6 Src/base/Security.cpp
View
@@ -16,6 +16,7 @@
*
* LICENSE@@@ */
+// this file was modified by "pcworld", 0188801@gmail.com
@@ -38,6 +39,7 @@
#include "Time.h"
#include "QtUtils.h"
+#include "Utils.h"
#include <QCryptographicHash>
#include <QDebug>
@@ -487,6 +489,10 @@ void Security::readDecryptedPasscode(std::string& passcode) const
}
}
+bool Security::isPasswordOutdated() const {
+ return is_base64_string(readPasscode());
+}
+
void Security::safelyEraseString(std::string& str) const
{
str.replace(0, str.size(), str.size(), 0);
2  Src/base/Security.h
View
@@ -16,6 +16,7 @@
*
* LICENSE@@@ */
+// this file was modified by "pcworld", 0188801@gmail.com
@@ -48,6 +49,7 @@ class Security : public QObject
std::string getLockMode() const { return m_lockMode; };
+ bool isPasswordOutdated() const;
int setPasscode(const std::string& mode, const std::string& passcode, std::string& errorText);
bool matchPasscode(std::string passcode, int& retriesLeft, bool& lockedOut);
8 Src/base/Utils.cpp
View
@@ -16,6 +16,7 @@
*
* LICENSE@@@ */
+// this file was modified by "pcworld", 0188801@gmail.com
@@ -583,6 +584,13 @@ static inline bool is_base64(unsigned char c) {
return (isalnum(c) || (c == '+') || (c == '/'));
}
+bool is_base64_string(std::string const& str) {
+ QString string = QString::fromStdString(str);
+ QRegExp rx("[^a-zA-Z0-9+/=]");
+
+ return (rx.indexIn(string) == -1 && (string.length() % 4) == 0 && string.length() >= 4);
+}
+
std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) {
QByteArray decoded = QByteArray::fromRawData((const char *)bytes_to_encode, in_len);
QByteArray encoded = decoded.toBase64();
2  Src/base/Utils.h
View
@@ -16,6 +16,7 @@
*
* LICENSE@@@ */
+// this file was modified by "pcworld", 0188801@gmail.com
@@ -79,6 +80,7 @@ bool extractFromJson(struct json_object * root,const std::string& key,int& r_val
bool extractFromJson(struct json_object * root,const std::string& key,bool& r_value);
struct json_object * JsonGetObject(struct json_object * root,const std::string& key);
+bool is_base64_string(std::string const& str);
std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);
3  Src/lunaui/lockscreen/LockWindow.cpp
View
@@ -16,6 +16,7 @@
*
* LICENSE@@@ */
+// this file was modified by "pcworld", 0188801@gmail.com
@@ -1256,7 +1257,7 @@ void LockWindow::tryUnlock()
return;
if (requiresPasscode()) {
- if (EASPolicyManager::instance()->policyPending()) {
+ if (EASPolicyManager::instance()->policyPending() || Security::instance()->isPasswordOutdated()) {
// User needs to set up a new PIN/Password
changeState(StateNewPinDialog);
8 sysmgr.pro
View
@@ -45,8 +45,10 @@ ENV_BUILD_TYPE = $$(BUILD_TYPE)
# Prevent conflict with usage of "signal" in other libraries
CONFIG += no_keywords
-CONFIG += link_pkgconfig
-PKGCONFIG = glib-2.0 gthread-2.0
+# We don't have .pc files for most things, rely on being passed
+# the needed include/library search paths
+# CONFIG += link_pkgconfig
+# PKGCONFIG = glib-2.0 gthread-2.0
QT = core gui declarative
@@ -670,7 +672,7 @@ QMAKE_CXXFLAGS += -DFIX_FOR_QT
#-DNO_WEBKIT_INIT
# Override the default (-Wall -W) from g++.conf mkspec (see linux-g++.conf)
-QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wno-unused-variable -Wno-reorder -Wno-missing-field-initializers -Wno-extra
+QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wno-unused-variable -Wno-reorder -Wno-missing-field-initializers -Wno-extra -Wno-strict-aliasing
LIBS += -lcjson -lLunaSysMgrIpc -lLunaKeymaps -lWebKitLuna -llunaservice -lpbnjson_cpp -lhelpers

No commit comments for this range

Something went wrong with that request. Please try again.