From 6ca918bbb5ebc7ecce3e63a9711a9cd8020549ab Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 3 Feb 2023 16:52:09 +0100 Subject: [PATCH] Made RPM work again --- buildrpm | 2 ++ elog.spec.template | 2 +- src/auth.cxx | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/buildrpm b/buildrpm index 71adbffb..ebd01e00 100755 --- a/buildrpm +++ b/buildrpm @@ -63,8 +63,10 @@ mkdir $dir/logbooks/demo/2001 # copy files to archive unalias cp cp -p src/*.c $dir/src +cp -p src/*.cxx $dir/src cp -p src/*.h $dir/src cp -p mxml/*.c $dir/mxml +cp -p mxml/*.cxx $dir/mxml cp -p mxml/*.h $dir/mxml cp -p Makefile $dir cp -p elogd.cfg.example $dir/elogd.cfg.example diff --git a/elog.spec.template b/elog.spec.template index 0e7f8abf..b9b97f92 100644 --- a/elog.spec.template +++ b/elog.spec.template @@ -14,7 +14,7 @@ # Build options : # Read: If neither macro exists, then add the default definition. %{?_with_krb5: %define _with_krb5 USE_KRB5=1} -%{?_with_ldap: %define _with_ldap USE_LDAP=1} +%{?_with_ldap: %define _with_ldap USE_LDAP=0} %{?_with_pam: %define _with_pam USE_PAM=1} %{?_with_ssl: %define _with_ssl USE_SSL=1} # Default build options are with SSL diff --git a/src/auth.cxx b/src/auth.cxx index 77f4eed5..9ac4e017 100644 --- a/src/auth.cxx +++ b/src/auth.cxx @@ -448,12 +448,12 @@ int elog_conv(int num_msg, const struct pam_message **mess, struct pam_response /* if we do not have enough space to allocate the response, we have an error * */ - if((*resp = calloc(num_msg, sizeof(struct pam_response))) == NULL) + if((*resp = (pam_response*) calloc(num_msg, sizeof(struct pam_response))) == NULL) return (PAM_BUF_ERR); /* this is the password we got through the UI, this is put into the * response, and given to pam_authenticate */ - if(!(resptok = strdup(my_data))) { + if(!(resptok = strdup((const char *)my_data))) { free(resp); return (PAM_BUF_ERR); }