/*++ /* NAME /* user_acl 3 /* SUMMARY /* user name based access control /* SYNOPSIS /* #include <user_acl.h> /* /* const char *check_user_acl_byuid(pname, acl, uid) /* const char *pname; /* const char *acl; /* uid_t uid; /* DESCRIPTION /* check_user_acl_byuid() converts the given uid into a user /* name, and checks the result against a user name matchlist. /* If the uid cannot be resolved to a user name, "unknown" /* is used as the lookup key instead. /* The result is NULL on success, the username upon failure. /* The error result lives in static storage and must be saved /* if it is to be used to across multiple check_user_acl_byuid() /* calls. /* /* Arguments: /* .IP pname /* The parameter name of the acl. /* .IP acl /* Authorized user name list suitable for input to string_list_init(3). /* .IP uid /* The uid to be checked against the access list. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Victor Duchovni /* Morgan Stanley
/*--*/
/* System library. */
#include <sys_defs.h> #include <string.h>
/* Utility library. */
#include <vstring.h> #include <dict_static.h>
/* Global library. */
#include <string_list.h> #include <mypwd.h>
/* Application-specific. */
#include"user_acl.h"
/* check_user_acl_byuid - check user authorization */
list = string_list_init(pname, MATCH_FLAG_NONE, acl); if ((matched = string_list_match(list, name)) == 0) { if (!who)
who = vstring_alloc(10);
vstring_strcpy(who, name);
}
string_list_free(list); if (mypwd)
mypwfree(mypwd);
return (matched ? 0 : vstring_str(who));
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.