Browse code
checkpoint
Greg Wiley authored on 06/04/2017 18:25:32
Showing 4 changed files
Showing 4 changed files
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
MODULEFLAGS = -fPIC -fno-stack-protector |
2 |
-MODULEOBJS = dual_control.o logging.o dc_syslog.o |
|
2 |
+MODULEOBJS = dual_control.o logging.o dc_syslog.o token.o |
|
3 | 3 |
HEADERS = logging.h dc_syslog.h |
4 | 4 |
|
5 | 5 |
MODULELIB = pam_dual_control.so |
... | ... |
@@ -26,13 +26,20 @@ distclean: clean |
26 | 26 |
|
27 | 27 |
dual_control_test: dual_control_test.c dual_control.o |
28 | 28 |
$(CC) $(CFLAGS) $(CPPFLAGS) -lpam -o $@ $^ |
29 |
+ |
|
29 | 30 |
logging_test: logging_test.c logging.o |
30 | 31 |
$(CC) $(CFLAGS) $(CPPFLAGS) -lpam -o $@ $^ |
31 | 32 |
|
33 |
+token_test: token_test.c token.o |
|
34 |
+ $(CC) $(CFLAGS) $(CPPFLAGS) -lpam -o $@ $^ |
|
35 |
+ |
|
36 |
+ |
|
37 |
+ |
|
32 | 38 |
.PHONY: test |
33 |
-test: dual_control_test logging_test |
|
39 |
+test: dual_control_test logging_test token_test |
|
34 | 40 |
@./dual_control_test |
35 | 41 |
@./logging_test |
42 |
+ @./token_test |
|
36 | 43 |
@echo all tests passed |
37 | 44 |
|
38 | 45 |
.PHONY: install |
2 | 6 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+#include "token.h" |
|
2 |
+#include "testutil.h" |
|
3 |
+ |
|
4 |
+int validate_compares_to_user_token() { |
|
5 |
+ fail(); |
|
6 |
+} |
|
7 |
+ |
|
8 |
+RESET_VARS_START |
|
9 |
+RESET_VARS_END |
|
10 |
+ |
|
11 |
+int runtests() { |
|
12 |
+ test(validate_compares_to_user_token); |
|
13 |
+ succeed(); |
|
14 |
+} |
|
15 |
+ |
|
16 |
+int main(int argc, char **argv) { |
|
17 |
+ return !runtests(); |
|
18 |
+} |
|
19 |
+ |
|
20 |
+ |