aabdian@trusty:~/src/google-authenticator-PAM/libpam$ uname -a
Linux trusty 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
aabdian@trusty:~/src/google-authenticator-PAM/libpam$ make
# cc --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o pam_google_authenticator.o pam_google_authenticator.c
cc --std=gnu99 -Wall -g -O0 -fno-inline -fPIC -c -fvisibility=hidden -o pam_google_authenticator.o pam_google_authenticator.c
pam_google_authenticator.c: In function ‘log_message’:
pam_google_authenticator.c:90:3: warning: format not a string literal and no format arguments [-Wformat-security]
syslog(priority, current_msg);
^
pam_google_authenticator.c: In function ‘auth_helper’:
pam_google_authenticator.c:720:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(int i = 0; i < 2 & !pw; i++){
^
# cc --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o support.o support.c
cc --std=gnu99 -Wall -g -O0 -fno-inline -fPIC -c -fvisibility=hidden -o support.o support.c
cc -shared -g -o pam_google_authenticator.so pam_google_authenticator.o support.o base32.o hmac.o sha1.o -lpam
# cc --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o demo.o demo.c
cc --std=gnu99 -Wall -g -O0 -fno-inline -fPIC -c -fvisibility=hidden -o demo.o demo.c
demo.c: In function ‘pam_get_item’:
demo.c:88:36: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]
memcpy(item, &service, sizeof(&service));
^
demo.c:93:33: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]
memcpy(item, &user, sizeof(&user));
^
# cc -DDEMO --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o pam_google_authenticator_demo.o pam_google_authenticator.c
cc -DDEMO --std=gnu99 -Wall -O0 -g -fPIC -c -fvisibility=hidden -o pam_google_authenticator_demo.o pam_google_authenticator.c
pam_google_authenticator.c: In function ‘log_message’:
pam_google_authenticator.c:90:3: warning: format not a string literal and no format arguments [-Wformat-security]
syslog(priority, current_msg);
^
pam_google_authenticator.c: In function ‘auth_helper’:
pam_google_authenticator.c:720:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(int i = 0; i < 2 & !pw; i++){
^
cc -g -rdynamic -o demo demo.o pam_google_authenticator_demo.o support.o base32.o hmac.o sha1.o -ldl
# cc --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o gauth_chktoken.o gauth_chktoken.c
cc --std=gnu99 -Wall -g -O0 -fno-inline -fPIC -c -fvisibility=hidden -o gauth_chktoken.o gauth_chktoken.c
cc -g -o gauth_chktoken gauth_chktoken.o support.o base32.o hmac.o sha1.o -ldl
cc -DTESTING --std=gnu99 -Wall -O0 -g -fPIC -c -fvisibility=hidden -o gauth_chktoken_testing.o gauth_chktoken.c
cc -DTESTING --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o support_testing.o support.c
cc -g -o gauth_chktoken_testing gauth_chktoken_testing.o support_testing.o base32.o hmac.o sha1.o -ldl
cc -DTESTING --std=gnu99 -Wall -O0 -g -fPIC -c -fvisibility=hidden -o pam_google_authenticator_testing.o pam_google_authenticator.c
pam_google_authenticator.c: In function ‘log_message’:
pam_google_authenticator.c:90:3: warning: format not a string literal and no format arguments [-Wformat-security]
syslog(priority, current_msg);
^
pam_google_authenticator.c: In function ‘auth_helper’:
pam_google_authenticator.c:720:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
for(int i = 0; i < 2 & !pw; i++){
^
pam_google_authenticator.c: At top level:
pam_google_authenticator.c:522:12: warning: ‘parse_config_file’ defined but not used [-Wunused-function]
static int parse_config_file(pam_handle_t *pamh, Params *params) {
^
cc -shared -g -o pam_google_authenticator_testing.so pam_google_authenticator_testing.o support_testing.o base32.o hmac.o sha1.o -lpam
# cc --std=gnu99 -Wall -O2 -g -fPIC -c -fvisibility=hidden -o pam_google_authenticator_unittest.o pam_google_authenticator_unittest.c
cc --std=gnu99 -Wall -g -O0 -fno-inline -fPIC -c -fvisibility=hidden -o pam_google_authenticator_unittest.o pam_google_authenticator_unittest.c
pam_google_authenticator_unittest.c: In function ‘pam_get_item’:
pam_google_authenticator_unittest.c:84:36: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]
memcpy(item, &service, sizeof(&service));
^
pam_google_authenticator_unittest.c:89:33: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]
memcpy(item, &user, sizeof(&user));
^
In file included from pam_google_authenticator_unittest.c:19:0:
pam_google_authenticator_unittest.c: In function ‘main’:
pam_google_authenticator_unittest.c:498:63: warning: argument to ‘sizeof’ in ‘memcmp’ call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
assert(!memcmp(rate_limit + 13, rate_limit_exp, sizeof(rate_limit_exp)));
^
cc -g -rdynamic -o pam_google_authenticator_unittest pam_google_authenticator_unittest.o base32.o hmac.o sha1.o -lc -ldl
aabdian@trusty:~/src/google-authenticator-PAM/libpam$