Displaying 6 results from an estimated 6 matches for "max_gid".
2009 May 28
1
[PATCH] klibc-utils: add minils
...nclude <errno.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <sys/types.h>
+
+#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
+
+static int max_nlinks = 1;
+static int max_size = 1;
+static int max_uid = 1;
+static int max_gid = 1;
+static int max_min = 1;
+static int max_maj = 1;
+
+static void do_preformat(const struct stat *st) {
+ int bytes;
+
+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
+ max_nlinks = bytes;
+
+ if ((bytes = snprintf(NULL, 0, "%ju", (uin...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go.
Next run will go into usr/kinit directory.
No code changes, just codingstyle fixes (verified with size(3)).
maximilian attems (5):
[klibc] sleep: have argument on next line
[klibc] readklink: remove unneeded braces
[klibc] mount: whitespace policy
[klibc] ls: fix various checkpatch complaints
[klibc] tests: checkpatch fixlets
2009 May 29
1
[PATCH v2] klibc-utils: add simple ls
...lt;unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/sysmacros.h>
+
+#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
+
+static size_t max_linksiz = 128;
+static int max_nlinks = 1;
+static int max_size = 1;
+static int max_uid = 1;
+static int max_gid = 1;
+static int max_min = 1;
+static int max_maj = 1;
+
+static void do_preformat(const struct stat *st)
+{
+ int bytes;
+
+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
+ max_nlinks = bytes;
+
+ if ((bytes = snprintf(NULL, 0, "%ju", (ui...
2018 Oct 11
1
macOS Mojave: setgroups(501) failed: Too many extra groups
On Thu, Oct 11, 2018 at 10:55:39AM +0300, Aki Tuomi wrote:
> Maybe. Have to see when we can implement it though. It could probably
> leverage the min/max_gid setting.
Actually that was a great hint.
Setting
last_valid_gid = 100
in the config and restarting helped.
Having a filter-list instead of fixed upper/lower bounds would be more
flexible. I guess though that in reality most systems/setups have ranges
for different kinds of groups, so that t...
2018 Oct 11
2
macOS Mojave: setgroups(501) failed: Too many extra groups
On Thu, Oct 11, 2018 at 09:51:34AM +0300, Aki Tuomi wrote:
> > Looking at the source, I see this is handled in
> > src/lib/restrict-access.c::fix_groups_list(),
> > where above the call to setgroups() a gid_list2 is constructed. I
> > wonder if one could
> > have a config option to prevent adding all those extra groups, which
> > then make the
> > call to
2018 Oct 11
0
macOS Mojave: setgroups(501) failed: Too many extra groups
...> it seems that all the com.apple ones can easily be dropped.
> What about a config list, that the admin can set with a list of gids, that can be dropped/are not added to gid_list2 ?
>
> Heiko
>
Maybe. Have to see when we can implement it though. It could probably
leverage the min/max_gid setting.
Aki