search for: groups_byname

Displaying 9 results from an estimated 9 matches for "groups_byname".

2004 Feb 20
1
NGROUPS_MAX on Linux
...============================ RCS file: /cvs/openssh/groupaccess.c,v retrieving revision 1.7 diff -u -u -r1.7 groupaccess.c --- groupaccess.c 14 May 2003 03:40:07 -0000 1.7 +++ groupaccess.c 19 Feb 2004 23:50:38 -0000 @@ -31,7 +31,7 @@ #include "log.h" static int ngroups; -static char *groups_byname[NGROUPS_MAX + 1]; /* +1 for base/primary group */ +static char **groups_byname; /* * Initialize group access list for user with primary (base) and @@ -40,20 +40,33 @@ int ga_init(const char *user, gid_t base) { - gid_t groups_bygid[NGROUPS_MAX + 1]; - int i, j; + gid_t *groups_bygid; + int...
2006 May 04
2
xmalloc(foo*bar) -> xcalloc(foo, bar) for Portable
...p -r1.10 groupaccess.c --- groupaccess.c 26 Mar 2006 03:24:49 -0000 1.10 +++ groupaccess.c 4 May 2006 01:56:11 -0000 @@ -52,8 +52,8 @@ ga_init(const char *user, gid_t base) ngroups = MAX(NGROUPS_MAX, sysconf(_SC_NGROUPS_MAX)); #endif - groups_bygid = xmalloc(ngroups * sizeof(*groups_bygid)); - groups_byname = xmalloc(ngroups * sizeof(*groups_byname)); + groups_bygid = xcalloc(ngroups, sizeof(*groups_bygid)); + groups_byname = xcalloc(ngroups, sizeof(*groups_byname)); if (getgrouplist(user, base, groups_bygid, &ngroups) == -1) logit("getgrouplist: groups list too small"); Index: mo...
2019 Feb 22
3
[PATCH 2/2] Cygwin: implement case-insensitive Unicode user and group name matching
On Wed, 20 Feb 2019 at 23:54, Corinna Vinschen <vinschen at redhat.com> wrote: > The previous revert enabled case-insensitive user names again. This > patch implements the case-insensitive user and group name matching. > To allow Unicode chars, implement the matcher using wchar_t chars in > Cygwin-specific code. Keep the generic code changes as small as possible. > Cygwin:
2002 Sep 25
1
NGROUPS_MAX
Currently openssh (3.4p1) relies on the NGROUPS_MAX define. This makes the number of allowed simultaneous (per-user) secondary groups a compile-time decision. $ find . -name \*.c | xargs grep NGROUPS_MAX ./groupaccess.c:static char *groups_byname[NGROUPS_MAX + 1]; /* +1 for base/primary group */ ./groupaccess.c: gid_t groups_bygid[NGROUPS_MAX + 1]; ./uidswap.c:static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; ./uidswap.c: saved_egroupslen = getgroups(NGROUPS_MAX, saved_egroups); ./uidswap.c: u...
2007 Nov 02
1
[Patch, enh] Permit host and IP addresses in (Allow|Deny)Groups
...000 -0700 +++ osshGroupHostIP-4.7p1/groupaccess.c 2007-11-02 14:46:08.000000000 -0700 @@ -37,6 +37,10 @@ #include "match.h" #include "log.h" +#ifdef GROUP_MATCH_HOST_AND_IP +#include <string.h> +#endif /* GROUP_MATCH_HOST_AND_IP */ + static int ngroups; static char **groups_byname; @@ -86,6 +90,40 @@ return 1; return 0; } +#ifdef GROUP_MATCH_HOST_AND_IP + +/* + * Permit the 'user at host' configuration file syntax (AllowUsers, ...) + * to be used for 'group at host' as well. (AllowGroups, ...). + * + * Return 1 if one of user's groups is matched...
2004 Feb 20
24
[Bug 787] Minor security problem due to use of deprecated NGROUPS_MAX in uidswap.c (sshd)
http://bugzilla.mindrot.org/show_bug.cgi?id=787 ------- Additional Comments From openssh_bugzilla at hockin.org 2004-02-20 13:01 ------- Created an attachment (id=548) --> (http://bugzilla.mindrot.org/attachment.cgi?id=548&action=view) NGROUPS patch ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2019 Feb 22
2
[PATCH 2/2] Cygwin: implement case-insensitive Unicode user and group name matching
...f --git a/groupaccess.c b/groupaccess.c index 43367990d8c3..1a498d16beac 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -103,11 +103,8 @@ ga_match_pattern_list(const char *group_pattern) int i, found = 0; for (i = 0; i < ngroups; i++) { -#ifndef HAVE_CYGWIN - switch (match_pattern_list(groups_byname[i], group_pattern, 0)) { -#else - switch (match_pattern_list(groups_byname[i], group_pattern, 1)) { -#endif + switch (match_usergroup_pattern_list(groups_byname[i], + group_pattern)) { case -1: return 0; /* Negated match wins */ case 0: diff --git a/match.c b/match.c index b50ae405...
2019 Feb 20
3
[PATCH 0/2] Cygwin: allow user and group case-insensitive Unicode strings
Windows usernames are case-insensitive and almost any Unicode character is allowed in a username. The user should be able to login with her username given in any case and not be refused. However, this opens up a security problem in terms of the sshd_config Match rules. The match rules for user and group names have to operate case-insensitive as well, otherwise the user can override her settings
2004 Oct 02
12
[Bug 938] "AllowGroups" option and secondary user's groups limit
http://bugzilla.mindrot.org/show_bug.cgi?id=938 Summary: "AllowGroups" option and secondary user's groups limit Product: Portable OpenSSH Version: 3.9p1 Platform: ix86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: PAM support AssignedTo: openssh-bugs at