projects
/
itkacl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe9ef96
)
Make itkacl-test print out error messages.
author
Steinar H. Gunderson
<sesse@samfundet.no>
Thu, 20 Jun 2013 22:00:51 +0000
(
00:00
+0200)
committer
Steinar H. Gunderson
<sesse@samfundet.no>
Thu, 20 Jun 2013 22:00:51 +0000
(
00:00
+0200)
itkacl-2.0/itkacl-test.c
patch
|
blob
|
history
diff --git
a/itkacl-2.0/itkacl-test.c
b/itkacl-2.0/itkacl-test.c
index 8ebdb95305c349301d0784c8e7dbfbddfe6183a9..49388d4ca0fb244d5197c1507f1398a32c948189 100644
(file)
--- a/
itkacl-2.0/itkacl-test.c
+++ b/
itkacl-2.0/itkacl-test.c
@@
-5,8
+5,13
@@
int itkacl_check(const char * const realm, const char * const user,
int main()
{
- if (itkacl_check("/login/unix-servers/cirkus", "sesse", NULL, 0) == 0) {
+ char errmsg[1024];
+ int ret = itkacl_check("/login/unix-servers/cirkus", "sesse", errmsg, sizeof(errmsg));
+
+ if (ret == 0) {
printf("OK\n");
+ } else if (ret == -1) {
+ printf("Error: %s\n", errmsg);
} else {
printf("Not OK\n");
}