Rename KABC namespace

remotes/gitea/gg-tdeadmin-kcron
Timothy Pearson 12 years ago
parent 433591e9e5
commit 37a3f4c203

@ -4,7 +4,7 @@ INCLUDES = -I.. -I$(top_srcdir)/kuser $(all_includes)
#AM_CXXFLAGS = $(KU_NIS) $(KU_QUOTA) $(QUOTACTL) -D_KU_DEBUG #AM_CXXFLAGS = $(KU_NIS) $(KU_QUOTA) $(QUOTACTL) -D_KU_DEBUG
kuser_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kuser_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
kuser_LDADD = $(LIB_TDEUI) $(LIBCRYPT) $(LIBSHADOW) $(LIBGEN) $(LIB_KABC) -ltdentlm kuser_LDADD = $(LIB_TDEUI) $(LIBCRYPT) $(LIBSHADOW) $(LIBGEN) $(LIB_TDEABC) -ltdentlm
####### Files ####### Files

@ -58,17 +58,17 @@ editDefaults::editDefaults( TDEConfigSkeleton *config, TQWidget *parent, const c
KTabWidget *page3 = new KTabWidget( this ); KTabWidget *page3 = new KTabWidget( this );
page3->setMargin( KDialog::marginHint() ); page3->setMargin( KDialog::marginHint() );
ldconf = ldconf =
new KABC::LdapConfigWidget( new TDEABC::LdapConfigWidget(
KABC::LdapConfigWidget::W_USER | TDEABC::LdapConfigWidget::W_USER |
KABC::LdapConfigWidget::W_PASS | TDEABC::LdapConfigWidget::W_PASS |
KABC::LdapConfigWidget::W_BINDDN | TDEABC::LdapConfigWidget::W_BINDDN |
KABC::LdapConfigWidget::W_REALM | TDEABC::LdapConfigWidget::W_REALM |
KABC::LdapConfigWidget::W_HOST | TDEABC::LdapConfigWidget::W_HOST |
KABC::LdapConfigWidget::W_PORT | TDEABC::LdapConfigWidget::W_PORT |
KABC::LdapConfigWidget::W_VER | TDEABC::LdapConfigWidget::W_VER |
KABC::LdapConfigWidget::W_DN | TDEABC::LdapConfigWidget::W_DN |
KABC::LdapConfigWidget::W_SECBOX | TDEABC::LdapConfigWidget::W_SECBOX |
KABC::LdapConfigWidget::W_AUTHBOX, TDEABC::LdapConfigWidget::W_AUTHBOX,
page3 ); page3 );
page3->addTab( ldconf, i18n("Connection") ); page3->addTab( ldconf, i18n("Connection") );
@ -83,7 +83,7 @@ editDefaults::editDefaults( TDEConfigSkeleton *config, TQWidget *parent, const c
void editDefaults::slotQueryClicked() void editDefaults::slotQueryClicked()
{ {
KABC::LDAPUrl _url = ldconf->url(); TDEABC::LDAPUrl _url = ldconf->url();
mResult.clear(); mResult.clear();
mCancelled = true; mCancelled = true;
@ -99,7 +99,7 @@ void editDefaults::slotQueryClicked()
attrs.append("sambaSID"); attrs.append("sambaSID");
attrs.append("sambaAlgorithmicRidBase"); attrs.append("sambaAlgorithmicRidBase");
_url.setAttributes( attrs ); _url.setAttributes( attrs );
_url.setScope( KABC::LDAPUrl::One ); _url.setScope( TDEABC::LDAPUrl::One );
_url.setExtension( "x-dir", "base" ); _url.setExtension( "x-dir", "base" );
_url.setFilter( filter ); _url.setFilter( filter );
@ -137,7 +137,7 @@ void editDefaults::slotQueryClicked()
void editDefaults::loadData( TDEIO::Job*, const TQByteArray& d ) void editDefaults::loadData( TDEIO::Job*, const TQByteArray& d )
{ {
KABC::LDIF::ParseVal ret; TDEABC::LDIF::ParseVal ret;
if ( d.size() ) { if ( d.size() ) {
mLdif.setLDIF( d ); mLdif.setLDIF( d );
@ -147,7 +147,7 @@ void editDefaults::loadData( TDEIO::Job*, const TQByteArray& d )
do { do {
ret = mLdif.nextItem(); ret = mLdif.nextItem();
switch ( ret ) { switch ( ret ) {
case KABC::LDIF::Item: case TDEABC::LDIF::Item:
if ( mLdif.attr() == "sambaDomainName" ) if ( mLdif.attr() == "sambaDomainName" )
mDomain.name = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ); mDomain.name = TQString::fromUtf8( mLdif.val(), mLdif.val().size() );
else if ( mLdif.attr() == "sambaSID" ) else if ( mLdif.attr() == "sambaSID" )
@ -155,7 +155,7 @@ void editDefaults::loadData( TDEIO::Job*, const TQByteArray& d )
else if ( mLdif.attr() == "sambaAlgorithmicRidBase" ) else if ( mLdif.attr() == "sambaAlgorithmicRidBase" )
mDomain.ridbase = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt(); mDomain.ridbase = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt();
break; break;
case KABC::LDIF::EndEntry: case TDEABC::LDIF::EndEntry:
mProg->progressBar()->advance( 1 ); mProg->progressBar()->advance( 1 );
if ( !mDomain.name.isEmpty() && !mDomain.sid.isEmpty() ) if ( !mDomain.name.isEmpty() && !mDomain.sid.isEmpty() )
mResult.push_back( mDomain ); mResult.push_back( mDomain );
@ -165,7 +165,7 @@ void editDefaults::loadData( TDEIO::Job*, const TQByteArray& d )
break; break;
} }
} while ( ret != KABC::LDIF::MoreData ); } while ( ret != TDEABC::LDIF::MoreData );
} }
void editDefaults::loadResult( TDEIO::Job* job) void editDefaults::loadResult( TDEIO::Job* job)

@ -28,7 +28,7 @@
#include "ldapsamba.h" #include "ldapsamba.h"
class LdapSamba; class LdapSamba;
namespace KABC { class LdapConfigWidget; } namespace TDEABC { class LdapConfigWidget; }
namespace TDEIO { class Job; } namespace TDEIO { class Job; }
typedef struct SambaDomain { typedef struct SambaDomain {
@ -45,8 +45,8 @@ public:
private: private:
KProgressDialog *mProg; KProgressDialog *mProg;
LdapSamba *page3c; LdapSamba *page3c;
KABC::LdapConfigWidget *ldconf; TDEABC::LdapConfigWidget *ldconf;
KABC::LDIF mLdif; TDEABC::LDIF mLdif;
bool mCancelled; bool mCancelled;
TQString mErrorMsg; TQString mErrorMsg;
TQValueList<SambaDomain> mResult; TQValueList<SambaDomain> mResult;

@ -53,7 +53,7 @@ KGroupLDAP::KGroupLDAP( KUserPrefsBase *cfg ) : KU::KGroups( cfg )
mUrl.setExtension( "x-mech", mCfg->ldapsaslmech() ); mUrl.setExtension( "x-mech", mCfg->ldapsaslmech() );
} }
mUrl.setScope(KABC::LDAPUrl::One); mUrl.setScope(TDEABC::LDAPUrl::One);
mUrl.setExtension("x-dir","base"); mUrl.setExtension("x-dir","base");
caps = Cap_Passwd; caps = Cap_Passwd;
@ -108,13 +108,13 @@ void KGroupLDAP::data( TDEIO::Job*, const TQByteArray& data )
mParser.endLDIF(); mParser.endLDIF();
} }
KABC::LDIF::ParseVal ret; TDEABC::LDIF::ParseVal ret;
TQString name, val; TQString name, val;
TQByteArray value; TQByteArray value;
do { do {
ret = mParser.nextItem(); ret = mParser.nextItem();
switch ( ret ) { switch ( ret ) {
case KABC::LDIF::Item: case TDEABC::LDIF::Item:
name = mParser.attr().lower(); name = mParser.attr().lower();
value = mParser.val(); value = mParser.val();
val = TQString::fromUtf8( value, value.size() ); val = TQString::fromUtf8( value, value.size() );
@ -138,7 +138,7 @@ void KGroupLDAP::data( TDEIO::Job*, const TQByteArray& data )
else if ( name == "description" ) else if ( name == "description" )
mGroup->setDesc( val ); mGroup->setDesc( val );
break; break;
case KABC::LDIF::EndEntry: { case TDEABC::LDIF::EndEntry: {
KU::KGroup newGroup; KU::KGroup newGroup;
mGroups.append( new KU::KGroup( mGroup ) ); mGroups.append( new KU::KGroup( mGroup ) );
mGroup->copy( &newGroup ); mGroup->copy( &newGroup );
@ -152,7 +152,7 @@ void KGroupLDAP::data( TDEIO::Job*, const TQByteArray& data )
default: default:
break; break;
} }
} while ( ret != KABC::LDIF::MoreData ); } while ( ret != TDEABC::LDIF::MoreData );
} }
bool KGroupLDAP::reload() bool KGroupLDAP::reload()
@ -242,18 +242,18 @@ void KGroupLDAP::addData( KU::KGroup *group )
mUrl.dn().utf8() + "\n" + "objectclass: posixGroup\n"; mUrl.dn().utf8() + "\n" + "objectclass: posixGroup\n";
ldif += ldif +=
KABC::LDIF::assembleLine( "cn", group->getName() ) + "\n" + TDEABC::LDIF::assembleLine( "cn", group->getName() ) + "\n" +
KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n" + TDEABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n"; TDEABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n";
for ( uint i=0; i < group->count(); i++ ) { for ( uint i=0; i < group->count(); i++ ) {
ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i) ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "memberuid", group->user(i) ) + "\n";
} }
if ( ( getCaps() & Cap_Samba ) && ( group->getCaps() & KU::KGroup::Cap_Samba ) ) { if ( ( getCaps() & Cap_Samba ) && ( group->getCaps() & KU::KGroup::Cap_Samba ) ) {
ldif += "objectclass: sambagroupmapping\n" + ldif += "objectclass: sambagroupmapping\n" +
KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + "\n" + TDEABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + "\n" +
KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + "\n" + TDEABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + "\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n" + TDEABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n" +
KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n"; TDEABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
} }
ldif += "\n\n"; ldif += "\n\n";
kdDebug() << "ldif: " << ldif << endl; kdDebug() << "ldif: " << ldif << endl;
@ -288,26 +288,26 @@ void KGroupLDAP::modData( KU::KGroup *group )
} }
ldif += ldif +=
"-\nreplace: cn\n" + "-\nreplace: cn\n" +
KABC::LDIF::assembleLine( "cn", group->getName() ) + TDEABC::LDIF::assembleLine( "cn", group->getName() ) +
"\n-\nreplace: gidnumber\n" + "\n-\nreplace: gidnumber\n" +
KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + TDEABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) +
"\n-\nreplace: userpassword\n" + "\n-\nreplace: userpassword\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + TDEABC::LDIF::assembleLine( "userpassword", group->getPwd() ) +
"\n-\nreplace: memberuid\n"; "\n-\nreplace: memberuid\n";
for ( uint i=0; i < group->count(); i++ ) { for ( uint i=0; i < group->count(); i++ ) {
ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i)) + "\n"; ldif += TDEABC::LDIF::assembleLine( "memberuid", group->user(i)) + "\n";
} }
if ( getCaps() & Cap_Samba ) { if ( getCaps() & Cap_Samba ) {
if ( group->getCaps() & KU::KGroup::Cap_Samba ) { if ( group->getCaps() & KU::KGroup::Cap_Samba ) {
ldif += ldif +=
"-\nreplace: sambasid\n" + "-\nreplace: sambasid\n" +
KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + TDEABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) +
"\n-\nreplace: displayname\n" + "\n-\nreplace: displayname\n" +
KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + TDEABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) +
"\n-\nreplace: description\n" + "\n-\nreplace: description\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) + TDEABC::LDIF::assembleLine( "description", group->getDesc() ) +
"\n-\nreplace: sambagrouptype\n" + "\n-\nreplace: sambagrouptype\n" +
KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n"; TDEABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
} else { } else {
ldif += "-\nreplace: sambasid\n"; ldif += "-\nreplace: sambasid\n";
ldif += "-\nreplace: displayname\n"; ldif += "-\nreplace: displayname\n";

@ -47,8 +47,8 @@ private slots:
void putData( TDEIO::Job *job, TQByteArray& data ); void putData( TDEIO::Job *job, TQByteArray& data );
void result( TDEIO::Job* ); void result( TDEIO::Job* );
private: private:
KABC::LDIF mParser; TDEABC::LDIF mParser;
KABC::LDAPUrl mUrl; TDEABC::LDAPUrl mUrl;
KProgressDialog *mProg; KProgressDialog *mProg;
KU::KGroup *mGroup, *mDelGroup, *mAddGroup; KU::KGroup *mGroup, *mDelGroup, *mAddGroup;

@ -54,7 +54,7 @@ KUserLDAP::KUserLDAP(KUserPrefsBase *cfg) : KU::KUsers( cfg )
mUrl.setExtension( "x-mech", mCfg->ldapsaslmech() ); mUrl.setExtension( "x-mech", mCfg->ldapsaslmech() );
} }
mUrl.setScope(KABC::LDAPUrl::One); mUrl.setScope(TDEABC::LDAPUrl::One);
mUrl.setExtension("x-dir","base"); mUrl.setExtension("x-dir","base");
caps = Cap_Passwd | Cap_Disable_POSIX; caps = Cap_Passwd | Cap_Disable_POSIX;
@ -102,13 +102,13 @@ void KUserLDAP::data( TDEIO::Job *, const TQByteArray& data )
mParser.endLDIF(); mParser.endLDIF();
} }
KABC::LDIF::ParseVal ret; TDEABC::LDIF::ParseVal ret;
TQString name, val; TQString name, val;
TQByteArray value; TQByteArray value;
do { do {
ret = mParser.nextItem(); ret = mParser.nextItem();
switch ( ret ) { switch ( ret ) {
case KABC::LDIF::Item: case TDEABC::LDIF::Item:
name = mParser.attr().lower(); name = mParser.attr().lower();
value = mParser.val(); value = mParser.val();
val = TQString::fromUtf8( value, value.size() ); val = TQString::fromUtf8( value, value.size() );
@ -203,7 +203,7 @@ void KUserLDAP::data( TDEIO::Job *, const TQByteArray& data )
else if ( name == "sambapasswordhistory" || name == "sambalogonhours" ) else if ( name == "sambapasswordhistory" || name == "sambalogonhours" )
schemaversion = 1; schemaversion = 1;
break; break;
case KABC::LDIF::EndEntry: { case TDEABC::LDIF::EndEntry: {
KU::KUser emptyUser, *newUser; KU::KUser emptyUser, *newUser;
kdDebug() << "new user: " << mUser->getName() << endl; kdDebug() << "new user: " << mUser->getName() << endl;
newUser = new KU::KUser( mUser ); newUser = new KU::KUser( mUser );
@ -227,7 +227,7 @@ void KUserLDAP::data( TDEIO::Job *, const TQByteArray& data )
default: default:
break; break;
} }
} while ( ret != KABC::LDIF::MoreData ); } while ( ret != TDEABC::LDIF::MoreData );
} }
bool KUserLDAP::reload() bool KUserLDAP::reload()
@ -428,37 +428,37 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
} }
if ( mod ) ldif += "-\nreplace: cn\n"; if ( mod ) ldif += "-\nreplace: cn\n";
ldif += KABC::LDIF::assembleLine( "cn", cn )+"\n"; ldif += TDEABC::LDIF::assembleLine( "cn", cn )+"\n";
if ( caps & Cap_InetOrg ) { if ( caps & Cap_InetOrg ) {
if ( mod ) ldif += "-\nreplace: uid\n"; if ( mod ) ldif += "-\nreplace: uid\n";
ldif += KABC::LDIF::assembleLine( "uid", user->getName() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "uid", user->getName() ) + "\n";
} else { } else {
if ( mod ) ldif += "-\nreplace: userid\n"; if ( mod ) ldif += "-\nreplace: userid\n";
ldif += KABC::LDIF::assembleLine( "userid", user->getName() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "userid", user->getName() ) + "\n";
} }
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) || ( caps & Cap_InetOrg ) ) { if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) || ( caps & Cap_InetOrg ) ) {
if ( mod ) ldif += "replace: userpassword\n"; if ( mod ) ldif += "replace: userpassword\n";
ldif += KABC::LDIF::assembleLine( "userpassword", pwd )+"\n"; ldif += TDEABC::LDIF::assembleLine( "userpassword", pwd )+"\n";
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
} }
if ( user->getCaps() & KU::KUser::Cap_POSIX ) { if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
if ( mod ) ldif += "replace: uidnumber\n"; if ( mod ) ldif += "replace: uidnumber\n";
ldif += KABC::LDIF::assembleLine( "uidnumber", ldif += TDEABC::LDIF::assembleLine( "uidnumber",
TQString::number( user->getUID() ) )+"\n"; TQString::number( user->getUID() ) )+"\n";
if ( mod ) ldif += "-\nreplace: gidnumber\n"; if ( mod ) ldif += "-\nreplace: gidnumber\n";
ldif += KABC::LDIF::assembleLine( "gidnumber", ldif += TDEABC::LDIF::assembleLine( "gidnumber",
TQString::number( user->getGID() ) )+"\n"; TQString::number( user->getGID() ) )+"\n";
if ( mod ) ldif += "-\nreplace: gecos\n"; if ( mod ) ldif += "-\nreplace: gecos\n";
ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() : ldif += TDEABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() :
TQCString( gecos.latin1() ) )+"\n"; TQCString( gecos.latin1() ) )+"\n";
if ( mod ) ldif += "-\nreplace: homedirectory\n"; if ( mod ) ldif += "-\nreplace: homedirectory\n";
ldif += KABC::LDIF::assembleLine( "homedirectory", ldif += TDEABC::LDIF::assembleLine( "homedirectory",
user->getHomeDir() )+"\n"; user->getHomeDir() )+"\n";
if ( mod ) ldif += "-\nreplace: loginshell\n"; if ( mod ) ldif += "-\nreplace: loginshell\n";
ldif += KABC::LDIF::assembleLine( "loginshell", ldif += TDEABC::LDIF::assembleLine( "loginshell",
user->getShell() )+"\n"; user->getShell() )+"\n";
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
} else { } else {
@ -474,50 +474,50 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
if ( caps & Cap_InetOrg ) { if ( caps & Cap_InetOrg ) {
if ( mod ) ldif += "replace: sn\n"; if ( mod ) ldif += "replace: sn\n";
ldif += KABC::LDIF::assembleLine( "sn", user->getSurname() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sn", user->getSurname() ) + "\n";
if ( mod ) ldif += "-\nreplace: mail\n"; if ( mod ) ldif += "-\nreplace: mail\n";
ldif += KABC::LDIF::assembleLine( "mail", user->getEmail() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "mail", user->getEmail() ) + "\n";
if ( mod ) ldif += "-\nreplace: displayName\n"; if ( mod ) ldif += "-\nreplace: displayName\n";
ldif += KABC::LDIF::assembleLine( "displayname", user->getFullName() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "displayname", user->getFullName() ) + "\n";
if ( mod ) ldif += "-\nreplace: postaladdress\n"; if ( mod ) ldif += "-\nreplace: postaladdress\n";
ldif += KABC::LDIF::assembleLine( "postaladdress", user->getAddress() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "postaladdress", user->getAddress() ) + "\n";
if ( mod ) ldif += "-\nreplace: telephoneNumber\n"; if ( mod ) ldif += "-\nreplace: telephoneNumber\n";
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice1() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "telephoneNumber", user->getOffice1() ) + "\n";
ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice2() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "telephoneNumber", user->getOffice2() ) + "\n";
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
} }
if ( caps & Cap_Samba ) { if ( caps & Cap_Samba ) {
if ( user->getCaps() & KU::KUser::Cap_Samba ) { if ( user->getCaps() & KU::KUser::Cap_Samba ) {
if ( mod ) ldif += "replace: sambadomainname\n"; if ( mod ) ldif += "replace: sambadomainname\n";
ldif += KABC::LDIF::assembleLine( "sambadomainname", user->getDomain() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambadomainname", user->getDomain() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambauserworkstations\n"; if ( mod ) ldif += "-\nreplace: sambauserworkstations\n";
ldif += KABC::LDIF::assembleLine( "sambauserworkstations", user->getWorkstations() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambauserworkstations", user->getWorkstations() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambahomepath\n"; if ( mod ) ldif += "-\nreplace: sambahomepath\n";
ldif += KABC::LDIF::assembleLine( "sambahomepath", user->getHomePath() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambahomepath", user->getHomePath() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambahomedrive\n"; if ( mod ) ldif += "-\nreplace: sambahomedrive\n";
ldif += KABC::LDIF::assembleLine( "sambahomedrive", user->getHomeDrive() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambahomedrive", user->getHomeDrive() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambalogonscript\n"; if ( mod ) ldif += "-\nreplace: sambalogonscript\n";
ldif += KABC::LDIF::assembleLine( "sambalogonscript", user->getLoginScript() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambalogonscript", user->getLoginScript() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambaprofilepath\n"; if ( mod ) ldif += "-\nreplace: sambaprofilepath\n";
ldif += KABC::LDIF::assembleLine( "sambaprofilepath", user->getProfilePath() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambaprofilepath", user->getProfilePath() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambalmpassword\n"; if ( mod ) ldif += "-\nreplace: sambalmpassword\n";
ldif += KABC::LDIF::assembleLine( "sambalmpassword", user->getLMPwd() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambalmpassword", user->getLMPwd() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambantpassword\n"; if ( mod ) ldif += "-\nreplace: sambantpassword\n";
ldif += KABC::LDIF::assembleLine( "sambantpassword", user->getNTPwd() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambantpassword", user->getNTPwd() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambasid\n"; if ( mod ) ldif += "-\nreplace: sambasid\n";
ldif += KABC::LDIF::assembleLine( "sambasid", user->getSID().getSID() ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambasid", user->getSID().getSID() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambaacctflags\n"; if ( mod ) ldif += "-\nreplace: sambaacctflags\n";
ldif += KABC::LDIF::assembleLine( "sambaacctflags", samflags ) + "\n"; ldif += TDEABC::LDIF::assembleLine( "sambaacctflags", samflags ) + "\n";
if ( mod ) ldif += "-\nreplace: sambaprimarygroupsid\n"; if ( mod ) ldif += "-\nreplace: sambaprimarygroupsid\n";
ldif += KABC::LDIF::assembleLine( "sambaprimarygroupsid", ldif += TDEABC::LDIF::assembleLine( "sambaprimarygroupsid",
user->getPGSID().getSID() ) + "\n"; user->getPGSID().getSID() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambapwdlastset\n"; if ( mod ) ldif += "-\nreplace: sambapwdlastset\n";
ldif += KABC::LDIF::assembleLine( "sambapwdlastset", ldif += TDEABC::LDIF::assembleLine( "sambapwdlastset",
TQString::number( user->getLastChange() ) ) + "\n"; TQString::number( user->getLastChange() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: sambakickofftime\n"; if ( mod ) ldif += "-\nreplace: sambakickofftime\n";
if ( user->getExpire() != -1 ) ldif += if ( user->getExpire() != -1 ) ldif +=
KABC::LDIF::assembleLine( "sambakickofftime", TDEABC::LDIF::assembleLine( "sambakickofftime",
TQString::number( user->getExpire() ) ) + "\n"; TQString::number( user->getExpire() ) ) + "\n";
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
} else { } else {
@ -555,25 +555,25 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
if ( caps & Cap_Shadow ) { if ( caps & Cap_Shadow ) {
if ( user->getCaps() & KU::KUser::Cap_POSIX ) { if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset
ldif += KABC::LDIF::assembleLine( "shadowlastchange", ldif += TDEABC::LDIF::assembleLine( "shadowlastchange",
TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n"; TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange
ldif += KABC::LDIF::assembleLine( "shadowmin", ldif += TDEABC::LDIF::assembleLine( "shadowmin",
TQString::number( user->getMin() ) ) + "\n"; TQString::number( user->getMin() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange
ldif += KABC::LDIF::assembleLine( "shadowmax", ldif += TDEABC::LDIF::assembleLine( "shadowmax",
TQString::number( user->getMax() ) ) + "\n"; TQString::number( user->getMax() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowwarning\n"; if ( mod ) ldif += "-\nreplace: shadowwarning\n";
ldif += KABC::LDIF::assembleLine( "shadowwarning", ldif += TDEABC::LDIF::assembleLine( "shadowwarning",
TQString::number( user->getWarn() ) ) + "\n"; TQString::number( user->getWarn() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowinactive\n"; if ( mod ) ldif += "-\nreplace: shadowinactive\n";
ldif += KABC::LDIF::assembleLine( "shadowinactive", ldif += TDEABC::LDIF::assembleLine( "shadowinactive",
TQString::number( user->getInactive() ) ) + "\n"; TQString::number( user->getInactive() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime
ldif += KABC::LDIF::assembleLine( "shadowexpire", ldif += TDEABC::LDIF::assembleLine( "shadowexpire",
TQString::number( timeToDays( user->getExpire() ) ) ) + "\n"; TQString::number( timeToDays( user->getExpire() ) ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowflag\n"; if ( mod ) ldif += "-\nreplace: shadowflag\n";
ldif += KABC::LDIF::assembleLine( "shadowflag", ldif += TDEABC::LDIF::assembleLine( "shadowflag",
TQString::number( user->getFlag() ) ) + "\n"; TQString::number( user->getFlag() ) ) + "\n";
if ( mod ) ldif += "-\n"; if ( mod ) ldif += "-\n";
} else { } else {

@ -47,8 +47,8 @@ private slots:
void putData( TDEIO::Job *job, TQByteArray& data ); void putData( TDEIO::Job *job, TQByteArray& data );
void result( TDEIO::Job* ); void result( TDEIO::Job* );
private: private:
KABC::LDIF mParser; TDEABC::LDIF mParser;
KABC::LDAPUrl mUrl; TDEABC::LDAPUrl mUrl;
KProgressDialog *mProg; KProgressDialog *mProg;
bool mOk, mCancel; bool mOk, mCancel;
KU::KUser *mUser, *mDelUser, *mAddUser; KU::KUser *mUser, *mDelUser, *mAddUser;

Loading…
Cancel
Save