summaryrefslogtreecommitdiffstats
path: root/kuser
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2026-01-06 11:32:15 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2026-01-06 16:43:33 +0900
commit1dd8222792710b74ab283d3832284455d5affa7d (patch)
tree19587979c9edd23419cb52da1b4a8a005d6b1e9d /kuser
parent3e22959a47d82ce8baefea9458102340be013350 (diff)
downloadtdeadmin-master.tar.gz
tdeadmin-master.zip
Replace TRUE/FALSE with boolean values true/falseHEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kuser')
-rw-r--r--kuser/kgroup.cpp2
-rw-r--r--kuser/kgroupfiles.cpp24
-rw-r--r--kuser/kgroupldap.cpp2
-rw-r--r--kuser/kuser.cpp8
-rw-r--r--kuser/kuserfiles.cpp54
-rw-r--r--kuser/kusersystem.cpp10
6 files changed, 50 insertions, 50 deletions
diff --git a/kuser/kgroup.cpp b/kuser/kgroup.cpp
index 77fcc91..5b61efd 100644
--- a/kuser/kgroup.cpp
+++ b/kuser/kgroup.cpp
@@ -174,7 +174,7 @@ void KU::KGroup::clear()
KU::KGroups::KGroups(KUserPrefsBase *cfg)
{
- mGroups.setAutoDelete(TRUE);
+ mGroups.setAutoDelete(true);
mCfg = cfg;
}
diff --git a/kuser/kgroupfiles.cpp b/kuser/kgroupfiles.cpp
index 7466d91..d77308b 100644
--- a/kuser/kgroupfiles.cpp
+++ b/kuser/kgroupfiles.cpp
@@ -45,9 +45,9 @@
KGroupFiles::KGroupFiles( KUserPrefsBase *cfg ) : KGroups( cfg )
{
- gs_backuped = FALSE;
- gr_backuped = FALSE;
- gn_backuped = FALSE;
+ gs_backuped = false;
+ gr_backuped = false;
+ gn_backuped = false;
smode = 0400;
mode = 0644;
@@ -122,7 +122,7 @@ bool KGroupFiles::reload()
TQString tmp;
if (fgrp == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
- return FALSE;
+ return false;
}
while ((p = fgetgrent(fgrp)) != NULL) {
@@ -166,11 +166,11 @@ bool KGroupFiles::reload()
} // end of processing files, for loop
if( (group_errno == 0) && (nisgroup_errno == 0) )
- return(TRUE);
+ return(true);
if( (group_errno != 0) && (nisgroup_errno != 0) )
- return(FALSE);
+ return(false);
else
- return(TRUE);
+ return(true);
}
bool KGroupFiles::save()
@@ -213,19 +213,19 @@ bool KGroupFiles::save()
if(!group_filename.isEmpty()) {
if (!gr_backuped) {
if ( !backup(group_filename) ) return false;
- gr_backuped = TRUE;
+ gr_backuped = true;
}
}
if(!gshadow_filename.isEmpty()) {
if (!gs_backuped) {
if ( !backup(gshadow_filename) ) return false;
- gs_backuped = TRUE;
+ gs_backuped = true;
}
}
if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) {
if (!gn_backuped) {
if ( !backup(nisgroup_filename) ) return false;
- gn_backuped = TRUE;
+ gn_backuped = true;
}
}
@@ -365,12 +365,12 @@ bool KGroupFiles::save()
if( (nis_groups_written > 0) || (nisgroup_filename == group_filename) ) {
if (system(GRMKDB) != 0) {
KMessageBox::error( 0, i18n("Unable to build NIS group databases.") );
- return FALSE;
+ return false;
}
}
#endif
- return TRUE;
+ return true;
}
bool KGroupFiles::dbcommit()
diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp
index 977cb06..a567831 100644
--- a/kuser/kgroupldap.cpp
+++ b/kuser/kgroupldap.cpp
@@ -31,7 +31,7 @@
KGroupLDAP::KGroupLDAP( KUserPrefsBase *cfg ) : KU::KGroups( cfg )
{
- mGroups.setAutoDelete(TRUE);
+ mGroups.setAutoDelete(true);
if ( mCfg->ldapssl() )
mUrl.setProtocol("ldaps");
diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp
index 687cf44..27c332c 100644
--- a/kuser/kuser.cpp
+++ b/kuser/kuser.cpp
@@ -688,7 +688,7 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
} else if ( info.isDir() ) {
TQDir dir(filename);
- d.mkdir(name, FALSE);
+ d.mkdir(name, false);
copyDir(s.filePath(name), d.filePath(name));
if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
@@ -817,7 +817,7 @@ int KU::KUser::removeProcesses()
KU::KUsers::KUsers(KUserPrefsBase *cfg)
{
- mUsers.setAutoDelete(TRUE);
+ mUsers.setAutoDelete(true);
mCfg = cfg;
}
@@ -891,7 +891,7 @@ bool KU::KUsers::doCreate(KU::KUser *user)
}
}
- return TRUE;
+ return true;
}
bool KU::KUsers::doDelete( KU::KUser *user )
@@ -906,7 +906,7 @@ bool KU::KUsers::doDelete( KU::KUser *user )
/*
user->removeProcesses();
*/
- return TRUE;
+ return true;
}
KU::KUser *KU::KUsers::lookup(const TQString & name)
diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp
index 2d9bef5..be2f762 100644
--- a/kuser/kuserfiles.cpp
+++ b/kuser/kuserfiles.cpp
@@ -47,9 +47,9 @@
KUserFiles::KUserFiles(KUserPrefsBase *cfg) : KUsers( cfg )
{
- pw_backuped = FALSE;
- pn_backuped = FALSE;
- s_backuped = FALSE;
+ pw_backuped = false;
+ pn_backuped = false;
+ s_backuped = false;
pwd_mode = 0644;
pwd_uid = 0;
@@ -59,7 +59,7 @@ KUserFiles::KUserFiles(KUserPrefsBase *cfg) : KUsers( cfg )
sdw_uid = 0;
sdw_gid = 0;
- mUsers.setAutoDelete(TRUE);
+ mUsers.setAutoDelete(true);
caps = Cap_Passwd;
#ifdef HAVE_SHADOW
@@ -78,12 +78,12 @@ KUserFiles::~KUserFiles()
bool KUserFiles::reload() {
if (!loadpwd())
- return FALSE;
+ return false;
if (!loadsdw())
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
// Load passwd file
@@ -156,7 +156,7 @@ bool KUserFiles::loadpwd()
FILE *fpwd = fopen(TQFile::encodeName(filename), "r");
if(fpwd == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
- return FALSE;
+ return false;
}
while ((p = fgetpwent(fpwd)) != NULL) {
@@ -208,11 +208,11 @@ bool KUserFiles::loadpwd()
} // end of processing files, for loop
if( (passwd_errno == 0) && (nispasswd_errno == 0) )
- return (TRUE);
+ return (true);
if( (passwd_errno != 0) && (nispasswd_errno != 0) )
- return (FALSE);
+ return (false);
else
- return(TRUE);
+ return(true);
}
// Load shadow passwords
@@ -227,7 +227,7 @@ bool KUserFiles::loadsdw()
shadow_file = mCfg->shadowsrc();
if ( shadow_file.isEmpty() )
- return TRUE;
+ return true;
stat( TQFile::encodeName(shadow_file), &st);
sdw_mode = st.st_mode & 0666;
@@ -240,7 +240,7 @@ bool KUserFiles::loadsdw()
if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) );
caps &= ~Cap_Shadow;
- return TRUE;
+ return true;
}
while ((spw = fgetspent( f ))) { // read a shadow password structure
#else
@@ -280,7 +280,7 @@ bool KUserFiles::loadsdw()
#endif
#endif // HAVE_SHADOW
- return TRUE;
+ return true;
}
// Save password file
@@ -326,15 +326,15 @@ bool KUserFiles::savepwd()
if(!passwd_filename.isEmpty()) {
if (!pw_backuped) {
- if (!backup(passwd_filename)) return FALSE;
- pw_backuped = TRUE;
+ if (!backup(passwd_filename)) return false;
+ pw_backuped = true;
}
}
if(!nispasswd_filename.isEmpty() &&
(nispasswd_filename != passwd_filename)) {
if (!pn_backuped) {
- if (!backup(nispasswd_filename)) return FALSE;
- pn_backuped = TRUE;
+ if (!backup(nispasswd_filename)) return false;
+ pn_backuped = true;
}
}
@@ -484,18 +484,18 @@ bool KUserFiles::savepwd()
#if defined(__FreeBSD__) || defined(__bsdi__)
if (system(PWMKDB) != 0) {
KMessageBox::error( 0, i18n("Unable to build password database.") );
- return FALSE;
+ return false;
}
#else
if( (nis_users_written > 0) || (nispasswd_filename == passwd_filename) ) {
if (system(PWMKDB) != 0) {
KMessageBox::error( 0, i18n("Unable to build password databases.") );
- return FALSE;
+ return false;
}
}
#endif
- return TRUE;
+ return true;
}
#undef escstr
@@ -515,16 +515,16 @@ bool KUserFiles::savesdw()
TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT);
if ( shadow_file.isEmpty() )
- return TRUE;
+ return true;
if (!s_backuped) {
- if (!backup(shadow_file)) return FALSE;
- s_backuped = TRUE;
+ if (!backup(shadow_file)) return false;
+ s_backuped = true;
}
if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) );
- return FALSE;
+ return false;
}
s.sp_namp = (char *)malloc(200);
@@ -580,7 +580,7 @@ bool KUserFiles::savesdw()
free(s.sp_namp);
free(s.sp_pwdp);
#endif // HAVE_SHADOW
- return TRUE;
+ return true;
}
@@ -616,5 +616,5 @@ bool KUserFiles::dbcommit()
mDel.clear();
mAdd.clear();
mMod.clear();
- return TRUE;
+ return true;
}
diff --git a/kuser/kusersystem.cpp b/kuser/kusersystem.cpp
index 89a0c7d..40bd99d 100644
--- a/kuser/kusersystem.cpp
+++ b/kuser/kusersystem.cpp
@@ -36,7 +36,7 @@
KUserSystem::KUserSystem(KUserPrefsBase *cfg) : KU::KUsers( cfg )
{
- mUsers.setAutoDelete(TRUE);
+ mUsers.setAutoDelete(true);
caps = Cap_ReadOnly | Cap_Passwd;
#ifdef HAVE_SHADOW
@@ -56,12 +56,12 @@ KUserSystem::~KUserSystem()
bool KUserSystem::reload()
{
if (!loadpwd())
- return FALSE;
+ return false;
if (!loadsdw())
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
// Load passwd file
@@ -99,7 +99,7 @@ bool KUserSystem::loadpwd()
}
endpwent();
- return(TRUE);
+ return(true);
}
// Load shadow passwords