summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/x2gosessionadministration/files/x2gosessionadministration-ldap.patch')
-rw-r--r--net-misc/x2gosessionadministration/files/x2gosessionadministration-ldap.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/x2gosessionadministration/files/x2gosessionadministration-ldap.patch b/net-misc/x2gosessionadministration/files/x2gosessionadministration-ldap.patch
new file mode 100644
index 0000000..c0adb02
--- /dev/null
+++ b/net-misc/x2gosessionadministration/files/x2gosessionadministration-ldap.patch
@@ -0,0 +1,66 @@
+diff -u -x '*.kde*' -r x2gosessionadministration-2.0.1/src/x2gosessionadministration.cpp x2gosessionadministration-2.0.1-mod/src/x2gosessionadministration.cpp
+--- x2gosessionadministration-2.0.1/src/x2gosessionadministration.cpp 2009-02-09 14:39:18.000000000 +0100
++++ x2gosessionadministration-2.0.1-mod/src/x2gosessionadministration.cpp 2009-05-12 18:23:57.000000000 +0200
+@@ -118,12 +118,18 @@
+ QTextStream stream(&file);
+ uri = stream.readLine();
+ base = stream.readLine();
++ bindDN = stream.readLine();
++ bindDNPw = stream.readLine();
+
+ file.close();
+ useLDAP=true;
+ QStringList lst;
+ lst=lst.split("\"",base);
+ base=lst[1];
++ lst=lst.split("\"",bindDN);
++ bindDN=lst[1];
++ lst=lst.split("\"",bindDNPw);
++ bindDNPw=lst[1];
+ lst=lst.split("//",uri);
+ uri=lst[1];
+ }
+@@ -314,18 +320,18 @@
+ {
+ if (useLDAP)
+ {
+- QString passfile="/etc/libnss-ldap.secret";
+- QFile file(passfile);
+- QCString tpass;
++// QString passfile="/etc/x2go/x2goldaptools.conf";
++// QFile file(passfile);
++// QCString tpass;
++
++// if (file.open(IO_ReadOnly))
++// {
++// QTextStream in(&file);
++// in>>tpass;
++// file.close();
++// }
+
+- if (file.open(IO_ReadOnly))
+- {
+- QTextStream in(&file);
+- in>>tpass;
+- file.close();
+- }
+-
+- ld=new LDAPSession(uri,389,"cn=ldapadmin,"+base,tpass.data(),false,true);
++ ld=new LDAPSession(uri,389,(const char*)bindDN,(const char*)bindDNPw,true,false);
+ }
+ }
+
+Nur in x2gosessionadministration-2.0.1-mod/src: x2gosessionadministration.cpp~.
+diff -u -x '*.kde*' -r x2gosessionadministration-2.0.1/src/x2gosessionadministration.h x2gosessionadministration-2.0.1-mod/src/x2gosessionadministration.h
+--- x2gosessionadministration-2.0.1/src/x2gosessionadministration.h 2009-02-09 14:39:18.000000000 +0100
++++ x2gosessionadministration-2.0.1-mod/src/x2gosessionadministration.h 2009-05-12 18:00:58.000000000 +0200
+@@ -114,6 +114,8 @@
+
+ QString base;
+ QString uri;
++ QString bindDN;
++ QString bindDNPw;
+ QString sServer;
+ QString sClient;
+ QString sUname;
+Nur in x2gosessionadministration-2.0.1-mod/src: x2gosessionadministration.h~.