summaryrefslogtreecommitdiff
blob: 3aff271a519a490e498bf4deb1aaaf3640fd01ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff -u -x '*.kde*' -r x2gogroupadministration-2.0.1/src/x2gogroupadministration.cpp x2gogroupadministration-2.0.1-mod/src/x2gogroupadministration.cpp
--- x2gogroupadministration-2.0.1/src/x2gogroupadministration.cpp	2009-02-09 14:39:30.000000000 +0100
+++ x2gogroupadministration-2.0.1-mod/src/x2gogroupadministration.cpp	2009-05-12 19:10:45.000000000 +0200
@@ -88,6 +88,8 @@
         QTextStream stream( &file );
         uri = stream.readLine();
         base = stream.readLine();
+        bindDN = stream.readLine();
+        bindDNPw = stream.readLine();
         file.close();
     }
     else
@@ -101,6 +103,10 @@
     base=lst[1];
     lst=lst.split("//",uri);    
     uri=lst[1];
+    lst=lst.split("\"",bindDN);
+    bindDN=lst[1];
+    lst=lst.split("\"",bindDNPw);
+    bindDNPw=lst[1];
     kdDebug()<<"base: "<<base<<" uri: "<<uri<<endl;
     QVBoxLayout* lay=new QVBoxLayout(this);
     QFrame* mainFrame=new QFrame(this);
@@ -243,17 +249,17 @@
     mainLay->addWidget(gbGroupInfo);
     mainLay->setSpacing(10);
     mainLay->setMargin(7);
-    QString passfile="/etc/libnss-ldap.secret";
-    QFile file1(passfile);
-    QCString tpass;
-    if (file1.open(IO_ReadOnly))
-    {
-        QTextStream in(&file1);
-        in>>tpass;
-        file1.close();
-    }
+//     QString passfile="/etc/libnss-ldap.secret";
+//     QFile file1(passfile);
+//     QCString tpass;
+//     if (file1.open(IO_ReadOnly))
+//     {
+//         QTextStream in(&file1);
+//         in>>tpass;
+//         file1.close();
+//     }
     kdDebug()<<"Init ldap"<<endl;
-    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);
     kdDebug()<<"ok"<<endl;
     gbGroupInfo->setEnabled(false);
     connect(lvUsers,SIGNAL(expanded(QListViewItem*)),
Nur in x2gogroupadministration-2.0.1-mod/src: x2gogroupadministration.cpp~.
diff -u -x '*.kde*' -r x2gogroupadministration-2.0.1/src/x2gogroupadministration.h x2gogroupadministration-2.0.1-mod/src/x2gogroupadministration.h
--- x2gogroupadministration-2.0.1/src/x2gogroupadministration.h	2009-02-09 14:39:30.000000000 +0100
+++ x2gogroupadministration-2.0.1-mod/src/x2gogroupadministration.h	2009-05-12 19:09:08.000000000 +0200
@@ -59,6 +59,8 @@
     KListView* lvUsers;
     QString base;
     QString uri;
+    QString bindDN;
+    QString bindDNPw;
     KLineEdit* leName;
     KLineEdit* leDescription;
     KListBox* lbNativeUsers;
Nur in x2gogroupadministration-2.0.1-mod/src: x2gogroupadministration.h~.