parent
6b705421fa
commit
a63d48d3ea
@ -0,0 +1,45 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <tqstringlist.h>
|
||||
#include <tqlabel.h>
|
||||
#include <tqmap.h>
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <ksimpleconfig.h>
|
||||
#include <klocale.h>
|
||||
#include <kdebug.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <kiconloader.h>
|
||||
#include <dcopclient.h>
|
||||
#include <kprocess.h>
|
||||
|
||||
#include "ldaplogindlg.h"
|
||||
|
||||
LDAPLogin::LDAPLogin(TQWidget *parent, const char *name ) : LDAPLoginDlg(parent,name) {
|
||||
|
||||
px_introSidebar->setPixmap(UserIcon("step3.png"));
|
||||
}
|
||||
|
||||
LDAPLogin::~LDAPLogin(){
|
||||
//
|
||||
}
|
||||
|
||||
#include "ldaplogindlg.moc"
|
@ -0,0 +1,39 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LDAPLOGIN_H
|
||||
#define LDAPLOGIN_H
|
||||
|
||||
#include "ldaplogindlgbase.h"
|
||||
|
||||
class TQStringList;
|
||||
|
||||
/**LDAP login dialog
|
||||
*@author Timothy Pearson
|
||||
*/
|
||||
|
||||
class LDAPLogin : public LDAPLoginDlg {
|
||||
Q_OBJECT
|
||||
public:
|
||||
LDAPLogin(TQWidget *parent=0, const char *name=0);
|
||||
~LDAPLogin();
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
|
||||
<class>LDAPLoginDlg</class>
|
||||
<widget class="TQWidget">
|
||||
<property name="name">
|
||||
<cstring>LDAPLoginDlg</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQLabel" row="0" column="0" rowspan="9" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>px_introSidebar</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>430</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="0" column="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>yad_string</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><h3>You're almost done!</h3></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="1" column="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>passprompt</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please provide LDAP realm administrator credentials below to complete the bonding process</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="2" column="2">
|
||||
<property name="name">
|
||||
<cstring>ldapAdminUsername</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KPasswordEdit" row="3" column="2">
|
||||
<property name="name">
|
||||
<cstring>ldapAdminPassword</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="4" column="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>LDAP Realm</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="4" column="2">
|
||||
<property name="name">
|
||||
<cstring>ldapAdminRealm</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer row="5" column="1">
|
||||
<property name="name">
|
||||
<cstring>Spacer6</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<spacer row="7" column="1">
|
||||
<property name="name">
|
||||
<cstring>Spacer5</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</grid>
|
||||
</widget>
|
||||
<layoutdefaults spacing="3" margin="6"/>
|
||||
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
|
||||
</UI>
|
@ -0,0 +1,49 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <klocale.h>
|
||||
#include <klineedit.h>
|
||||
#include <ktextedit.h>
|
||||
#include <knuminput.h>
|
||||
#include <kactionselector.h>
|
||||
#include <tqlistbox.h>
|
||||
#include <kpushbutton.h>
|
||||
#include <tqpixmap.h>
|
||||
#include <tqiconset.h>
|
||||
#include <tqlabel.h>
|
||||
|
||||
#include "ldappasswddlg.h"
|
||||
|
||||
LDAPPasswordDialog::LDAPPasswordDialog(TQWidget* parent, const char* name)
|
||||
: KDialogBase(parent, name, true, i18n("LDAP Authentication"), Ok|Cancel, Ok, true)
|
||||
{
|
||||
m_base = new LDAPLogin(this);
|
||||
|
||||
m_base->px_introSidebar->hide();
|
||||
m_base->yad_string->hide();
|
||||
|
||||
setMainWidget(m_base);
|
||||
}
|
||||
|
||||
void LDAPPasswordDialog::slotOk() {
|
||||
accept();
|
||||
}
|
||||
|
||||
#include "ldappasswddlg.moc"
|
@ -0,0 +1,42 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _LDAPPASSWORDDIALOG_H_
|
||||
#define _LDAPPASSWORDDIALOG_H_
|
||||
|
||||
#include <kdialogbase.h>
|
||||
|
||||
#include "ldaplogindlg.h"
|
||||
|
||||
class LDAPPasswordDialog : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LDAPPasswordDialog(TQWidget* parent = 0, const char* name = 0);
|
||||
|
||||
public slots:
|
||||
void slotOk();
|
||||
|
||||
public:
|
||||
LDAPLogin *m_base;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,72 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2012 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _LIBTDELDAP_H_
|
||||
#define _LIBTDELDAP_H_
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <tqstring.h>
|
||||
#include <tqdatetime.h>
|
||||
#include <tqvaluelist.h>
|
||||
|
||||
enum LDAPUserStatus {
|
||||
USER_STATUS_ENABLED,
|
||||
USER_STATUS_DISABLED
|
||||
};
|
||||
|
||||
typedef TQValueList<uid_t> UserList;
|
||||
typedef TQValueList<gid_t> GroupList;
|
||||
|
||||
class LDAPUserInfo
|
||||
{
|
||||
public:
|
||||
TQString name;
|
||||
uid_t uid;
|
||||
TQString shell;
|
||||
TQString homedir;
|
||||
gid_t primary_gid;
|
||||
GroupList grouplist;
|
||||
LDAPUserStatus status;
|
||||
TQDate password_last_changed;
|
||||
bool password_expires;
|
||||
TQDate password_expiration;
|
||||
bool password_ages;
|
||||
int new_password_interval;
|
||||
int new_password_warn_interval;
|
||||
int new_password_lockout_delay;
|
||||
bool password_has_minimum_age;
|
||||
int password_minimum_age;
|
||||
|
||||
TQString realName;
|
||||
TQString organization;
|
||||
// FIXME
|
||||
// Add other attributes (cubicle, phone number, etc)
|
||||
};
|
||||
|
||||
class LDAPGroupInfo
|
||||
{
|
||||
public:
|
||||
TQString name;
|
||||
gid_t gid;
|
||||
UserList userlist;
|
||||
};
|
||||
|
||||
#endif // _LIBTDELDAP_H_
|
Loading…
Reference in new issue