Hi all,
The attached patch adds _very_ simplistic password functionality to the
opensync plugin. It's against the barry-0.12 tarball. This works for
me, and I was able to sync my 8800 with evolution. Cool!
The approach is to have the user put the password into the config file
("Password foo"). This is quite horrible from a security perspective,
but hey, it works.
David
P.S. I was having problems with the device shutting down during sync
until I removed the usb_storage module as suggested in another thread.
A very unscientific test (it worked 1 time) says that fixed it for me!
diff -ur barry-0.12.orig/opensync-plugin/src/environment.cc barry-0.12/opensync-plugin/src/environment.cc
--- barry-0.12.orig/opensync-plugin/src/environment.cc 2008-01-25 22:57:31.000000000 -0500
+++ barry-0.12/opensync-plugin/src/environment.cc 2008-07-15 20:17:18.000000000 -0400
@@ -173,6 +173,7 @@
: member(pm),
m_pin(-1),
m_DebugMode(false),
+ m_password(""),
m_pCon(0),
m_CalendarSync(pm, "calendar"),
m_ContactsSync(pm, "contacts")
@@ -188,7 +189,7 @@
{
// Create controller
m_pCon = new Barry::Controller(m_ProbeResult);
- m_pCon->OpenMode(Barry::Controller::Desktop);
+ m_pCon->OpenMode(Barry::Controller::Desktop, m_password.c_str());
// Save the DBIDs and DBNames of the databases we will work with
m_CalendarSync.m_dbName = Barry::Calendar::GetDBName();
@@ -331,6 +332,10 @@
trace.log("contacts syncing enabled");
}
}
+ else if ( key == "Password" ) {
+ ils >> m_password;
+ trace.log("using password from config file");
+ }
}
}
diff -ur barry-0.12.orig/opensync-plugin/src/environment.h barry-0.12/opensync-plugin/src/environment.h
--- barry-0.12.orig/opensync-plugin/src/environment.h 2008-01-25 22:57:31.000000000 -0500
+++ barry-0.12/opensync-plugin/src/environment.h 2008-07-15 20:15:19.000000000 -0400
@@ -82,6 +82,7 @@
std::string m_ConfigData;
uint32_t m_pin;
bool m_DebugMode;
+ std::string m_password;
// device communication
Barry::ProbeResult m_ProbeResult;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel