diff options
author | Timothy Pearson <[email protected]> | 2013-04-23 11:48:48 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-04-23 11:48:48 -0500 |
commit | 56b0dc560c6242f074a28f553fd673dd33aebbac (patch) | |
tree | 273eb8673106a67841b9ea4c6de5a350aec44591 | |
parent | 30aed7ea7cb91ad773b2bebce0b611d72402b0c7 (diff) | |
download | kcmldapmanager-56b0dc560c6242f074a28f553fd673dd33aebbac.tar.gz kcmldapmanager-56b0dc560c6242f074a28f553fd673dd33aebbac.zip |
Fix command line tool crash
-rw-r--r-- | cmdline/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmdline/main.cpp b/cmdline/main.cpp index de3b1dd..b9d5a3a 100644 --- a/cmdline/main.cpp +++ b/cmdline/main.cpp @@ -134,14 +134,14 @@ int main(int argc, char *argv[]) return -1; } - LDAPUserInfoList userInfoList = ldapmanager.users(&retcode); + LDAPUserInfoList userInfoList = ldapmanager.users(&retcode, &errorString); if (retcode != 0) { - printf("[ERROR] Unable to retrieve list of users from realm controller\n\r"); + printf("[ERROR] Unable to retrieve list of users from realm controller\n\r[ERROR] Detailed debugging information: %s\n\r", errorString.ascii()); return -1; } - LDAPGroupInfoList groupInfoList = ldapmanager.groups(&retcode); + LDAPGroupInfoList groupInfoList = ldapmanager.groups(&retcode, &errorString); if (retcode != 0) { - printf("[ERROR] Unable to retrieve list of users from realm controller\n\r"); + printf("[ERROR] Unable to retrieve list of users from realm controller\n\r[ERROR] Detailed debugging information: %s\n\r", errorString.ascii()); return -1; } @@ -235,9 +235,9 @@ int main(int argc, char *argv[]) // Modify group(s) as needed bool revoke_all = args->isSet("revokeallgroups"); if ((groupList.count() > 0) || revoke_all) { - LDAPGroupInfoList groupInfoList = ldapmanager.groups(&retcode); + LDAPGroupInfoList groupInfoList = ldapmanager.groups(&retcode, &errorString); if (retcode != 0) { - printf("[ERROR] Unable to retrieve list of groups from realm controller\n\r"); + printf("[ERROR] Unable to retrieve list of groups from realm controller\n\r[ERROR] Detailed debugging information: %s\n\r", errorString.ascii()); return -1; } for (it = groupInfoList.begin(); it != groupInfoList.end(); ++it) { @@ -279,9 +279,9 @@ int main(int argc, char *argv[]) return -1; } - LDAPUserInfoList userInfoList = ldapmanager.users(&retcode); + LDAPUserInfoList userInfoList = ldapmanager.users(&retcode, &errorString); if (retcode != 0) { - printf("[ERROR] Unable to retrieve list of users from realm controller\n\r"); + printf("[ERROR] Unable to retrieve list of users from realm controller\n\r[ERROR] Detailed debugging information: %s\n\r", errorString.ascii()); return -1; } @@ -318,9 +318,9 @@ int main(int argc, char *argv[]) return -1; } - LDAPUserInfoList userInfoList = ldapmanager.users(&retcode); + LDAPUserInfoList userInfoList = ldapmanager.users(&retcode, &errorString); if (retcode != 0) { - printf("[ERROR] Unable to retrieve list of users from realm controller\n\r"); + printf("[ERROR] Unable to retrieve list of users from realm controller\n\r[ERROR] Detailed debugging information: %s\n\r", errorString.ascii()); return -1; } |