search for: gid_t

Displaying 20 results from an estimated 264 matches for "gid_t".

Did you mean: pid_t
2000 Feb 03
2
use sysconf instead of NGROUPS_MAX
Currently samba (2.0.6) 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 ./source/lib/system.c: if (setlen > NGROUPS_MAX) { ./source/lib/replace.c: gid_t grouplst[NGROUPS_MAX]; ./source/lib/replace.c: while (i < NGROUPS_MAX && ./source/smbd/password.c:#ifdef NGROUPS_MAX ./source/smbd/password.c: if((groups = (gid_t *)malloc(sizeof(gid_t)*NGROUPS_MAX)) == NULL) POSIX defined sysconf in order to avoid this. By using sysconf(_SC_N...
2015 Sep 27
2
v2.2.19 release candidate released
Timo, I have to test something on one of the BSD, namely related to src/lib/net.c . -- Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca God,Queen and country!Never Satan President Republic!Beware AntiChrist rising! http://www.fullyfollow.me/rootnl2k Look at Psalms 14 and 53 on Atheism Time for Stephen to move on on Oct 19 2015!!
2023 Nov 21
0
is it safe to encode/decode uid_t/gid_t in 4 bytes?
Hi, Samba internally uses 8 bytes to encode/decode uid_t/gid_t, e.g., _PUBLIC_ enum ndr_err_code ndr_push_uid_t(struct ndr_push *ndr, int ndr_flags, uid_t u) { NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)u); } I want to know if it is safe to use 4 bytes to reduce the size in storing security_info in...
1999 Aug 06
2
Solaris 7 5/99 and samba-2.0.5a (PR#19508)
...999/08/06 11:36:49, 0] locking/shmem_sysv.c:sysv_shm_open(597) > ERROR: root did not create the semaphore > [1999/08/06 11:36:49, 0] locking/locking.c:locking_init(174) > ERROR: Failed to initialise share modes Try this fix (it causes Samba to do a lookup on root and check the correct gid_t rather than just assuming 0). Regards, Jeremy Allison, Samba Team. --- /usr/people/jallison/src/samba-2/samba/source/locking/shmem_sysv.c Wed Jul 14 09:40:38 1999 +++ locking/shmem_sysv.c Thu Jul 29 10:41:15 1999 @@ -528,6 +528,7 @@ /***************************************************...
2004 Feb 20
1
NGROUPS_MAX on Linux
...file: /cvs/openssh/uidswap.c,v retrieving revision 1.42 diff -u -u -r1.42 uidswap.c --- uidswap.c 17 Dec 2003 07:53:26 -0000 1.42 +++ uidswap.c 19 Feb 2004 23:50:38 -0000 @@ -38,7 +38,7 @@ /* Saved effective uid. */ static int privileged = 0; static int temporarily_use_uid_effective = 0; -static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; +static gid_t *saved_egroups, *user_groups; static int saved_egroupslen = -1, user_groupslen = -1; /* @@ -68,17 +68,27 @@ privileged = 1; temporarily_use_uid_effective = 1; - saved_egroupslen = getgroups(NGROUPS_MAX, saved_egroups); +...
2020 Oct 05
1
Re: [PATCH nbdkit v2 1/3] server: Add new APIs for reading the client’s SO_PEERCRED.
...lled and this call returns C<-1>. > > > + > > > +=head2 C<nbdkit_peer_gid> > > > + > > > +(nbdkit E<ge> 1.24) > > > + > > > + int nbdkit_peer_gid (void); > > > > int for these two is probably fine. > > IIUC, gid_t/uid_t don't have their signed-ness specified by POSIX, > nor size, but you're required to cast negative values eg > > gid_t foo = (gid_t)-1; > > based on this, libvirt chose to expose them as "unsigned long long" to > maximise future proofing. We need an i...
2003 Apr 15
1
PATCH allow_zero_gid option
...t-access.c,v retrieving revision 1.10 diff -u -3 -p -r1.10 restrict-access.c --- src/lib/restrict-access.c 4 Mar 2003 04:00:13 -0000 1.10 +++ src/lib/restrict-access.c 15 Apr 2003 17:37:26 -0000 @@ -31,12 +31,14 @@ #include <grp.h> void restrict_access_set_env(const char *user, uid_t uid, gid_t gid, - const char *chroot_dir) + const char *chroot_dir, int allow_zg) { if (user != NULL && *user != '\0') env_put(t_strconcat("RESTRICT_USER=", user, NULL)); if (chroot_dir != NULL && *chroot_dir != '\0') env_put(t_strconcat(&quo...
2002 Sep 25
1
NGROUPS_MAX
...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: user_groupslen = getgroups(NGROUPS_MAX, user_groups); POSIX defined sysconf in orde...
2003 Apr 28
0
Samba crashes on password change from Windows 2000 clients
...1:42 bone smbd[496]: Apr 27 21:21:42 bone smbd[496]: Apr 27 21:21:42 bone /kernel: pid 496 (smbd), uid 65534: exited on signal 6 For a few times whilst windows was sitting there. I've had a look in util_sec.c and it appears to be happening somewhere around here, no? --- static void assert_gid(gid_t rgid, gid_t egid) { if ((egid != (gid_t)-1 && getegid() != egid) || (rgid != (gid_t)-1 && getgid() != rgid)) { if (!non_root_mode()) { DEBUG(0,("Failed to set gid privileges to (%d,%d) now set to (%d,%d) uid=(%d,%d)\n&...
2010 Nov 10
3
Occasional fchown errors?
Hi: I get the occasional error below. Is there something I don't have configured correctly? Or should I just ignore this? It is not always this file, sometimes it is the cache.lock file or the log.newlock file. I have a mail client running on my computer and my phone at the same time, could that have something to do with it? Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob):
2002 Jun 13
1
[2.PATCH]: Eliminate typo in bsd-misc.*
...-- openbsd-compat/bsd-misc.c 12 Jun 2002 16:57:15 -0000 1.7 +++ openbsd-compat/bsd-misc.c 13 Jun 2002 20:43:04 -0000 @@ -123,7 +123,7 @@ int truncate (const char *path, off_t le * Cygwin setgroups should be a noop. */ int -setgroups(size_t size, const git_t *list) +setgroups(size_t size, const gid_t *list) { return 0; } Index: openbsd-compat/bsd-misc.h =================================================================== RCS file: /cvs/openssh_cvs/openbsd-compat/bsd-misc.h,v retrieving revision 1.5 diff -u -p -r1.5 bsd-misc.h --- openbsd-compat/bsd-misc.h 12 Jun 2002 16:57:15 -0000 1.5 +++ o...
2013 Nov 21
2
[LLVMdev] [compiler-rt] Problem with asm/stat.h on openSUSE PPC64
...^ /usr/include/asm/stat.h:34:2: error: unknown type name 'mode_t' mode_t st_mode; ^ /usr/include/asm/stat.h:39:2: error: unknown type name 'uid_t' uid_t st_uid; ^ /usr/include/asm/stat.h:40:2: error: unknown type name 'gid_t' gid_t st_gid; ^ /usr/include/asm/stat.h:42:2: error: unknown type name 'off_t' off_t st_size; This obviously means that headers are not sanitized for userspace usage. Any ideas for a workaround? -------------- next part -------------- An...
2004 Jan 30
0
[PATCH] Group mapping primary group SID update
...******************************** + Update primary group SID in passdb with <string_sid> + for users whose Unix primary group is <gid>. Useful + after a net_groupmap add/modify/delete. +******************************************************/ +static BOOL update_users_primgroup_sid(const gid_t gid, fstring string_sid) +{ + SAM_ACCOUNT *sam_pwent=NULL; + struct passwd *pass=NULL; + fstring usrname = ""; + + /* Initialize static context */ + if(!initialize_password_db(True)) { + DEBUG(0,("update_users_primgroup_sid: Cannot initia...
2005 Mar 23
1
Problems with Excel & MS Word files (still)
Problem is apparently with locking issues, disabled oplocks in the [general] section, and the problem actually got worse... Here's what happens: User-A part of group1, opens Excel file off of share, saves, exits... User-B (or even User-A for that matter) tries to re-open same file, get error stating it's locked and can only open for read-only access... Both users in the same group, and
2005 Feb 24
1
[PATCH] Drop SETGROUPS_NOOP
...+++ openbsd-compat/bsd-misc.c 24 Feb 2005 12:59:53 -0000 @@ -122,17 +122,6 @@ int truncate(const char *path, off_t len } #endif /* HAVE_TRUNCATE */ -#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP) -/* - * Cygwin setgroups should be a noop. - */ -int -setgroups(size_t size, const gid_t *list) -{ - return (0); -} -#endif - #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) int nanosleep(const struct timespec *req, struct timespec *rem) { Index: openbsd-compat/bsd-misc.h =================================================================== RCS file: /cvs/openssh_cvs/op...
2013 Nov 12
0
[klibc:master] syscalls: Fixup some of the -at syscall declarations
...onst char *, const char *); -__extern int symlinkat(int, const char *, const char *); +__extern int symlinkat(const char *, int, const char *); __extern int readlink(const char *, char *, size_t); __extern int readlinkat(int, const char *, char *, size_t); __extern int chown(const char *, uid_t, gid_t); __extern int fchown(int, uid_t, gid_t); __extern int lchown(const char *, uid_t, gid_t); __extern char *getcwd(char *, size_t); +__extern int fchownat(int, const char *, uid_t, gid_t, int); /* Also in <fcntl.h> */ #ifndef _KLIBC_IN_OPEN_C diff --git a/usr/klibc/SYSCALLS.def b/usr/kli...
2010 Oct 14
2
Dovecot chgrp actions on new files/folders
...if (S_ISDIR(st.st_mode) && (st.st_mode & S_ISGID) != 0) { - /* directory's GID is used automatically for new + /* directory is sgid, so GID is used automatically for new files */ *gid_r = (gid_t)-1; } else if ((st.st_mode & 0070) >> 3 == (st.st_mode & 0007)) { @@ -460,9 +460,13 @@ } else if (getegid() == st.st_gid) { /* using our own gid, no need to change it */ *gid_r = (gid_t)-1; -...
2000 May 22
1
Inherit Permissions addition
...ly, --Kyle Kyle Herbert First 'Net' Impressions, LLC -------------- next part -------------- --- uid.c.original Thu May 11 04:57:19 2000 +++ uid.c Sat May 13 12:17:30 2000 @@ -160,9 +160,11 @@ { user_struct *vuser = get_valid_user_struct(vuid); int snum; - gid_t gid; + gid_t gid; uid_t uid; char group_c; + int inheritnewgid; + gid_t inheritedgid; if (!conn) { DEBUG(2,("Connection not open\n")); @@ -170,6 +172,43 @@ } /* + * See if we are inheriting permissions for...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...,15 @@ int readlink(const char *, char *, size_t); /* XXX: Is this right?! */ <?> int fstatat64,newfstatat,fstatat::fstatat(int, const char *, struct stat *, int); int getdents64,getdents::getdents(unsigned int, struct dirent *, unsigned int); -int chown32,chown::chown(const char *, uid_t, gid_t); +<?> int chown32,chown::chown(const char *, uid_t, gid_t); int fchown32,fchown::fchown(int, uid_t, gid_t); <?> int fchownat(int, const char *, uid_t, gid_t, int); -int lchown32,lchown::lchown(const char *, uid_t, gid_t); +<?> int lchown32,lchown::lchown(const char *, uid_t, gi...
2015 Sep 27
0
v2.2.19 release candidate released
...ucred.h reads #ifndef _SYS_UCRED_H_ #define _SYS_UCRED_H_ /* * Credentials. */ struct ucred { u_int cr_ref; /* reference count */ uid_t cr_uid; /* effective user id */ short cr_ngroups; /* number of groups */ gid_t cr_groups[NGROUPS]; /* groups */ }; #define cr_gid cr_groups[0] #define NOCRED NULL /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ struct fcred { uid_t fc_ruid; /* real user id */ gid_t...