DevelopmentSpecificationsLibTDELDAP

From Trinity Desktop Project Wiki
Revision as of 21:25, 14 May 2014 by imported>Eliddell (Created page with "Category:Developers What functionality does this library power? *LDAP/Kerberos realm bonding *DevelopmentSpecificationsKCMLDAPContro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What functionality does this library power?

Metrics

cloc --exclude-dir=.git .
    109 text files.
    100 unique files.
    474 files ignored.

http://cloc.sourceforge.net v 1.53  T=4.0 s (13.0 files/s, 22344.0 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Bourne Shell                     14           6047           5490          36868
m4                                2           1750            259          14334
Bourne Again Shell                4           1467           2155           9111
make                             13            424            323           3320
Perl                              7            516            378           2808
C++                               5            341            266           2278
C/C++ Header                      7            215            200            826
--------------------------------------------------------------------------------
SUM:                             52          10760           9071          69545
--------------------------------------------------------------------------------

Example objects and methods

Partial list:

enum LDAPKRB5Flags
enum KRB5TicketFlags
class LDAPCredentials
class LDAPRealmConfig
class LDAPCertConfig
class LDAPUserInfo
class LDAPGroupInfo
class LDAPMachineInfo
class LDAPServiceInfo
class LDAPTDEBuiltinsInfo
class KerberosTicketInfo
class LDAPManager
		TQString realm(); 
		TQString basedn();
		int bind(TQString* errstr=0);
		int unbind(bool force, TQString* errstr=0);
		LDAPUserInfoList users(int* retcode=0);
		LDAPGroupInfoList groups(int* retcode=0);
		LDAPMachineInfoList machines(int* retcode=0);
		LDAPServiceInfoList machineServices(TQString machine_dn, int* retcode=0);
		LDAPServiceInfoList services(int* retcode=0);
		LDAPUserInfo getUserByDistinguishedName(TQString dn);
		LDAPGroupInfo getGroupByDistinguishedName(TQString dn, TQString *errstr=0);
		int updateUserInfo(LDAPUserInfo user);
		int updateGroupInfo(LDAPGroupInfo group);
		int addUserInfo(LDAPUserInfo user);
		int addGroupInfo(LDAPGroupInfo group);
		int addServiceInfo(LDAPServiceInfo service, TQString *errstr=0);
		int deleteUserInfo(LDAPUserInfo user);
		int deleteGroupInfo(LDAPGroupInfo group);
		int deleteMachineInfo(LDAPMachineInfo machine);
		int deleteServiceInfo(LDAPServiceInfo service);

		LDAPCredentials currentLDAPCredentials();

		int moveKerberosEntries(TQString newSuffix, TQString* errstr=0);
		int writeCertificateFileIntoDirectory(TQByteArray cert, TQString attr, TQString* errstr=0);

		LDAPTDEBuiltinsInfo getTDEBuiltinMappings(TQString *errstr=0);
		int writeSudoersConfFile(TQString *errstr=0);
		int getTDECertificate(TQString certificateName, TQString fileName, TQString *errstr=0);
		int setPasswordForUser(LDAPUserInfo user, TQString *errstr);

		static void writeCronFiles();
		static void writePrimaryRealmCertificateUpdateCronFile();
		static TQString getMachineFQDN();
		static void writeLDAPConfFile(LDAPRealmConfig realmcfg);
		static void writeTDERealmList(LDAPRealmConfigList realms, KSimpleConfig* config);
		static LDAPRealmConfigList readTDERealmList(KSimpleConfig* config, bool disableAllBonds=false);
		static TQDateTime getCertificateExpiration(TQString certfile);

		static int generatePublicKerberosCACertificate(LDAPCertConfig certinfo);
		static int generatePublicKerberosCertificate(LDAPCertConfig certinfo, LDAPRealmConfig realmcfg);
		static int generatePublicLDAPCertificate(LDAPCertConfig certinfo, LDAPRealmConfig realmcfg, uid_t ldap_uid, gid_t l dap_gid);

		static TQString ldapdnForRealm(TQString realm);
		static TQString cnFromDn(TQString dn);

		static KerberosTicketInfoList getKerberosTicketList(TQString cache=TQString::null, TQString *cacheFileName=0);
		static int getKerberosPassword(LDAPCredentials &creds, TQString prompt, bool requestServicePrincipal=false, TQWidget* parent=0);
		static int obtainKerberosTicket(LDAPCredentials creds, TQString principal, TQString *errstr=0);
		static int obtainKerberosServiceTicket(TQString principal, TQString *errstr=0);
		static int destroyKerberosTicket(TQString principal, TQString *errstr=0);