diff options
Diffstat (limited to 'eurephiadm')
-rw-r--r-- | eurephiadm/commands/users.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/eurephiadm/commands/users.c b/eurephiadm/commands/users.c index 9210094..9c07a39 100644 --- a/eurephiadm/commands/users.c +++ b/eurephiadm/commands/users.c @@ -57,9 +57,6 @@ #include "../parse_certificate_files.h" #include "../xsltparser.h" -// Reuse code which is in certificates.c -#define SHOWCERTS_FIREWALL 0x001 -#define SHOWCERTS_DIGEST 0x002 /** * Forward declaration of a function already found in certificates.c @@ -242,41 +239,6 @@ int list_users(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int return 0; } -/** - * Simple function to convert account flags from an XML document to a string of flags, - * separated by space - * - * @param xpathCTX XPath context of the XML document being parsed. - * @param xpath XPath expression of the flag nodes. - * - * @return Returns a string of flags on success, otherwise NULL is returned. - */ -char *xmlFlags2str(xmlXPathContext *xpathCTX, const char *xpath) { - xmlXPathObject *flagsObj = NULL; - int i = 0; - static char flagstr[8194]; - - memset(&flagstr, 0, 8194); - - // Find the flag nodes given in the XPath query - flagsObj = xmlXPathEvalExpression((xmlChar *)xpath, xpathCTX); - if( flagsObj == NULL ) { - fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpath); - return flagstr; - } - - // Loop through all nodes and build up a string of all flags - for( i = 0; i < flagsObj->nodesetval->nodeNr; i++ ) { - char *flag = xmlExtractContent(flagsObj->nodesetval->nodeTab[i]); - if( flag != NULL ) { - strncat(flagstr, flag, 8191-strlen_nullsafe(flagstr)); - strcat(flagstr, " "); - } - } - xmlXPathFreeObject(flagsObj); - return flagstr; -} - /** * users show mode. Show account information for a particular user |