diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-11 00:05:29 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-11 00:05:29 +0100 |
commit | 94b035d4a269bf79374d8b43281cb516e5218a6c (patch) | |
tree | 1e9d1f6cf3b29f0d0210eec33d496098edbfe712 /eurephiadm/commands/users.c | |
parent | c71f6dab57b454f19f3566b6ed544ff10342ec16 (diff) | |
download | eurephia-94b035d4a269bf79374d8b43281cb516e5218a6c.tar.gz eurephia-94b035d4a269bf79374d8b43281cb516e5218a6c.tar.xz eurephia-94b035d4a269bf79374d8b43281cb516e5218a6c.zip |
Added functions for processing eurephiaACCESSINFO/eurephiaACCESSLIST
Implemented saving VPN access profile to the eurephiaCERTINFO struct and
filling the eurephiaACCESSINFO with the proper information needed in the
eDBadminGetUserInfo(...) function.
The special thing about eurephiaACCESSINFO, is that it will not register
duplicate records. And when the eurephiaCERTINFO is free'd, the
eurephiaACCESSLIST will automatically be free'd as well.
Diffstat (limited to 'eurephiadm/commands/users.c')
-rw-r--r-- | eurephiadm/commands/users.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/eurephiadm/commands/users.c b/eurephiadm/commands/users.c index 7f92061..aaeb666 100644 --- a/eurephiadm/commands/users.c +++ b/eurephiadm/commands/users.c @@ -276,17 +276,29 @@ int show_user(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int field_print_int("Associated certificates", user->certlist->num_certs); printf(" %3s (D) %-35.35s %33.33s\n %-49.49s %19.19s\n", "ID", "Common name", "Organisation", "e-mail", "Registered"); - printf("---------------------------------------------------------------------" +#ifdef FIREWALL + printf(" %-44.44s %24.24s\n", "Firewall access profile", "FW Destination"); +#endif + printf(" --------------------------------------------------------------------" "----------\n"); for( crt = user->certlist->certs; crt != NULL; crt = crt->next) { printf(" %3i (%1i) %-35.35s %33.33s\n %-49.49s %19.19s\n", crt->certid, crt->depth, crt->common_name, crt->organisation, crt->email, crt->registered); +#ifdef FIREWALL + printf(" %-44.44s %24.24s\n", + ((crt->access != NULL) && (crt->access->access_descr != NULL) + ? crt->access->access_descr : "(No firewall profile setup)"), + ((crt->access != NULL) && (crt->access->fwprofile != NULL) + ? crt->access->fwprofile : "-") + + ); +#endif if( crt->next != NULL ) { printf("\n"); } } - printf("---------------------------------------------------------------------" + printf(" --------------------------------------------------------------------" "----------\n"); } else { // If we wanted to show associated certs, and didn't find any - inform about it |