]> andersk Git - openssh.git/blobdiff - groupaccess.c
- markus@cvs.openbsd.org 2001/08/30 22:22:32
[openssh.git] / groupaccess.c
index 9f72e577eb2699e17061d694c4681067da32a1bd..cbfe720356d49dd3964ceea09d9a104799ba0d8e 100644 (file)
@@ -1,3 +1,5 @@
+/*     $OpenBSD: groupaccess.c,v 1.4 2001/06/26 17:27:23 markus Exp $  */
+
 /*
  * Copyright (c) 2001 Kevin Steves.  All rights reserved.
  *
 static int ngroups;
 static char *groups_byname[NGROUPS_MAX + 1];   /* +1 for base/primary group */
 
+/*
+ * Initialize group access list for user with primary (base) and
+ * supplementary groups.  Return the number of groups in the list.
+ */
 int
 ga_init(const char *user, gid_t base)
 {
@@ -51,6 +57,10 @@ ga_init(const char *user, gid_t base)
        return (ngroups = j);
 }
 
+/*
+ * Return 1 if one of user's groups is contained in groups.
+ * Return 0 otherwise.  Use match_pattern() for string comparison.
+ */
 int
 ga_match(char * const *groups, int n)
 {
@@ -63,6 +73,9 @@ ga_match(char * const *groups, int n)
        return 0;
 }
 
+/*
+ * Free memory allocated for group access list.
+ */
 void
 ga_free(void)
 {
This page took 0.333742 seconds and 4 git commands to generate.