@@ -246,6 +246,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -238,6 +238,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -198,6 +198,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -202,6 +202,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -204,6 +204,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -183,6 +183,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -203,6 +203,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
@@ -217,6 +217,7 @@ main(int argc, char **argv)
nsdb_display_fedfsstatus(retval));
goto out;
}
+ retval = FEDFS_ERR_INVAL;
if (binddn == NULL)
binddn = (char *)nsdb_default_binddn(host);
if (binddn == NULL) {
Commit afc64d55 changed the NSDB client commands to exit with a FedFS status code. One case that was missed was when the commands can't find the value of the LDAP bind DN or NCE from the command line, from environment variables, nor from the local NSDB connection parameter database. In this case, the commands were exiting with FEDFS_OK. Change these commands to instead exit with FEDFS_ERR_INVAL (an invalid parameter was provided) in this case. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- src/nsdbc/nsdb-annotate.c | 1 + src/nsdbc/nsdb-create-fsl.c | 1 + src/nsdbc/nsdb-create-fsn.c | 1 + src/nsdbc/nsdb-delete-fsl.c | 1 + src/nsdbc/nsdb-delete-fsn.c | 1 + src/nsdbc/nsdb-delete-nsdb.c | 1 + src/nsdbc/nsdb-describe.c | 1 + src/nsdbc/nsdb-update-fsl.c | 1 + 8 files changed, 8 insertions(+), 0 deletions(-)