Skip to contentSkip to conversation

configure: fix pam test warning

PATCH Applied Dr. David Alan Gilbert (git) 4 participants 4 messages Apr 4, 2019 – Apr 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: fix pam test warning

From: "Dr. David Alan Gilbert" <[email protected]>

The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 1c563a7027..73f7ad2be0 100755
@@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
 int main(void) {
    const char *service_name = "qemu";
    const char *user = "frank";
-   const struct pam_conv *pam_conv = NULL;
+   const struct pam_conv pam_conv = { 0 };
    pam_handle_t *pamh = NULL;
-   pam_start(service_name, user, pam_conv, &pamh);
+   pam_start(service_name, user, &pam_conv, &pamh);
    return 0;
 }
 EOF
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw

CC trivial

Quoted 11 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines
configure +0 -0
index 1c563a7027..73f7ad2be0 100755
@@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
 int main(void) {

configure if test "$auth_pam" != "no"; then · line 2954

Quoted 10 lines
configure +2 -2
    const char *service_name = "qemu";
    const char *user = "frank";
-   const struct pam_conv *pam_conv = NULL;
+   const struct pam_conv pam_conv = { 0 };
    pam_handle_t *pamh = NULL;
-   pam_start(service_name, user, pam_conv, &pamh);
+   pam_start(service_name, user, &pam_conv, &pamh);
    return 0;
 }
 EOF

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 29 lines · Daniel P. Berrangé

CC trivial

Quoted 11 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines
configure +1 -1
index 1c563a7027..73f7ad2be0 100755
@@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
 int main(void) {
    const char *service_name = "qemu";
    const char *user = "frank";
-   const struct pam_conv *pam_conv = NULL;
+   const struct pam_conv pam_conv = { 0 };
    pam_handle_t *pamh = NULL;
Quoted 9 lines

configure if test "$auth_pam" != "no"; then · line 2954

Quoted 5 lines
configure +1 -1
-   pam_start(service_name, user, pam_conv, &pamh);
+   pam_start(service_name, user, &pam_conv, &pamh);
    return 0;
 }
 EOF

Regards,
Daniel

Applied to my trivial-patches branch.

Thanks,
Laurent

Reviewed-by on v1 1/1
#3 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 8 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz.

Quoted 21 lines
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 1c563a7027..73f7ad2be0 100755
@@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
 int main(void) {
    const char *service_name = "qemu";
    const char *user = "frank";
-   const struct pam_conv *pam_conv = NULL;
+   const struct pam_conv pam_conv = { 0 };
    pam_handle_t *pamh = NULL;
-   pam_start(service_name, user, pam_conv, &pamh);
+   pam_start(service_name, user, &pam_conv, &pamh);
    return 0;
 }
 EOF