MigOpsRepos / credcheck

PostgreSQL plain credential checker
MIT License
57 stars 5 forks source link

New issue REDHAT6 #31

Closed Gabi201265 closed 6 months ago

Gabi201265 commented 6 months ago

Hi, there,

I tried to deploy the credheck extension on redhat6 machines. Here are the errors I got. It's postgres 11 and therefore I thought I could apply minimal restrictions like : credcheck.password_min_length=9 credcheck.password_min_special=1 credcheck.password_min_digit=1 credcheck.password_min_upper=1 credcheck.password_min_lower=1 credcheck.password_contain_username=1

Also, I'm deploying credcheck v.2.6.0. Maybe the problem must come from here.

Here the error message :

/bin/sh: grep : commande introuvable /bin/sh: sed : commande introuvable /bin/sh: grep : commande introuvable /bin/sh: sed : commande introuvable /bin/sh: grep : commande introuvable /bin/sh: sed : commande introuvable credcheck.c: In function 'to_nlower': credcheck.c:255: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c:255: note: use option -std=c99 or -std=gnu99 to compile your code credcheck.c: In function 'str_contains': credcheck.c:263: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c:264: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c: In function 'check_str_counters': credcheck.c:276: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c: In function 'char_repeat_exceeds': credcheck.c:298: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c:306: erreur: 'for' loop initial declarations are only allowed in C99 mode credcheck.c: In function 'cc_ProcessUtility': credcheck.c:1471: attention : implicit declaration of function 'save_password_in_history' Hors de toute fonction : cc1: attention : option "-Wno-ignored-attributes" de la ligne de commande non reconnue make: *** [credcheck.o] Erreur 1

Have a great day, Thank you very much, Best regards, Gabriel Leroux

darold commented 6 months ago

There is something wrong on your system, look like you don't have the shell tools or /bin is not in the PATH which looks odd.

You can try by setting EXTVERSION to 2.6.0 instead of the dynamic affectation using grep. I mean replace:

EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
               sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")

with

EXTVERSION = "2.6.0"
Gabi201265 commented 6 months ago

Thank for your help