search for: uid_t

Displaying 20 results from an estimated 420 matches for "uid_t".

Did you mean: pid_t
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_i...
2015 Aug 17
3
[PATCH] Expand tilde for UNIX domain socket forwards.
On Mon, 17 Aug 2015, Todd C. Miller wrote: > I like the idea but tilde_expand_filename() calls fatal() if it > cannot resolve ~foo. This is not terrible when using -L and -R on > the normal command line but it seems pretty harsh to exit when -L > or -R are used via the ~C escape or the streamlocal-forward at openssh.com > request. > Message-Id: <aea6cdc1d1b42d07 at
2001 Apr 05
0
HP-UX 9 problems (hangs on logout; tty isn't sane)
...> #include <arpa/inet.h> *** uidswap.c.orig Thu Apr 5 10:19:08 2001 --- uidswap.c Thu Apr 5 10:24:28 2001 *************** *** 17,22 **** --- 17,59 ---- #include "log.h" #include "uidswap.h" + #ifndef HAS_SETEUID + /* Linux man page says: + + int setreuid(uid_t ruid, uid_t euid); + int seteuid(uid_t euid); + + setreuid sets real and effective user ID's of the current process. + Un-privileged users may change the real user ID to the effective + user ID and vice-versa. + + [...] + + Currently seteuid(euid) is functionally equi...
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!!
2020 Mar 26
3
Rebuilding and re-checking of downstream dependencies on CRAN Mac build machines
I have two questions about the CRAN machines that build binary packages for Mac. When a new version of a package is released, (A) Do the downstream dependencies get re-checked? (B) Do the downstream dependencies get re-built? I have heard (but do not know for sure) that the answer to (A) is no, the downstream dependencies do not get rechecked. >From publicly available information on the
2013 Nov 12
0
[klibc:master] syscalls: Fixup some of the -at syscall declarations
...__extern int fchmodat(int, const char *, mode_t, int); __extern_inline int mkfifo(const char *__p, mode_t __m) { diff --git a/usr/include/unistd.h b/usr/include/unistd.h index f0e19c2..6c08d4e 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -61,28 +61,28 @@ __extern int setfsuid(uid_t); __extern int access(const char *, int); __extern int faccessat(int, const char *, int, int); __extern int link(const char *, const char *); -__extern int linkat(int, const char *, int, const char *); +__extern int linkat(int, const char *, int, const char *, int); __extern int unlink(const ch...
2013 Nov 21
2
[LLVMdev] [compiler-rt] Problem with asm/stat.h on openSUSE PPC64
...rors: /usr/include/asm/stat.h:31:2: error: unknown type name 'ino_t' ino_t st_ino; ^ /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 hea...
2002 Jun 07
4
openssh for UWIN
...YGWIN if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) return 0; *** readconf.c.orig Mon Feb 04 20:26:35 2002 --- readconf.c Thu May 30 16:55:00 2002 *************** *** 200,206 **** u_short host_port) { Forward *fwd; ! #ifndef HAVE_CYGWIN extern uid_t original_real_uid; if (port < IPPORT_RESERVED && original_real_uid != 0) fatal("Privileged ports can only be forwarded by root."); --- 200,206 ---- u_short host_port) { Forward *fwd; ! #if !defined(HAVE_CYGWIN) && !defined(_UWIN) extern uid_t origin...
2001 Sep 28
1
openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'
openssh-2.9.9p2 assumes that pid_t, uid_t, gid_t, and mode_t are no wider than int. GCC complains about this assumption on 32-bit Solaris 8 sparc, where these types are 'long', not 'int'. This isn't an actual problem at runtime on this host, as long and int are the same width, but it is a problem on other hosts where...
2000 Oct 03
1
Various platforms
...compiled alongside openssl-0.9.5a and zlib-1.1.3. Under HP-UX =========== uname -smr HP-UX A.09.03 9000/735 There is no seteuid or setreuid, but there is a setresuid, so using your model in bsd-misc.c, I did: ----------- #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) int seteuid(uid_t euid) { return(setreuid(-1,euid)); } #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ /* JPK */ int seteuid(uid_t euid) { return(setresuid(-1,euid,-1)); } ----------- This appears to be correct based on the documentation, and appears to work. Also under the sa...
2001 Jun 07
0
Patch for systems with no setreuid()
...til functions --- openbsd-compat/bsd-misc.c.orig Thu Jun 7 14:07:58 2001 +++ openbsd-compat/bsd-misc.c Thu Jun 7 14:26:12 2001 @@ -70,6 +70,20 @@ } #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ +#if !defined(HAVE_SETEUID) && defined(HAVE_SETRESUID) +int seteuid(uid_t euid) +{ + return(setresuid(-1,euid,-1)); +} +#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETRESUID) */ + +#if !defined(HAVE_SETREUID) && defined(HAVE_SETRESUID) +int setreuid(uid_t ruid, uid_t euid) +{ + return(setresuid(ruid,euid,-1)); +} +#endif /* !defined(HAVE_SETREUID) &a...
2003 Apr 15
1
PATCH allow_zero_gid option
...lib/restrict-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_str...
2016 May 12
0
[PATCH 3/4] appliance: Move code for creating supermin appliance directory to tmpdirs.c.
...iance (guestfs_h *g, const char *path, void *data); static int contains_fixed_appliance (guestfs_h *g, const char *path, void *data); static int contains_supermin_appliance (guestfs_h *g, const char *path, void *data); -static int build_supermin_appliance (guestfs_h *g, const char *supermin_path, uid_t uid, char **kernel, char **initrd, char **appliance); +static int build_supermin_appliance (guestfs_h *g, const char *supermin_path, char **kernel, char **initrd, char **appliance); static int run_supermin_build (guestfs_h *g, const char *lockfile, const char *appliancedir, const char *supermin_pa...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...14 +141,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 *, ui...
2004 Mar 30
1
[Bug 565] gcc 3.2.3 compiler warnings for openssh-3.6.1p2 on Solaris 7
...thostname' Solaris 2.5.1 has gethostname but no prototype for it. >monitor.c:1038: warning: int format, pid_t arg (arg 4) Gone. >ssh-rand-helper.c:254: warning: implicit declaration of function `getrusage' No prototype for getrusage. >ssh-rand-helper.c:535: warning: int format, uid_t arg (arg 3) >ssh-rand-helper.c:553: warning: int format, uid_t arg (arg 2) >ssh-rand-helper.c:592: warning: int format, uid_t arg (arg 2) All gone. >sftp-server.c:604: warning: implicit declaration of function `utimes' No prototypes for utimes either. >sftp-client.c:1046: warning:...
2007 Apr 18
1
Linux Equivalent of SetFilePerm() api
Hi everyone, We are trying to port our own windows application to SUSE linux.Our application uses SetFilePerm() api defined in commondll.dll.We would like to know whether there is a linux equivalent of windows commondll.dll in wine... If not then what could be the possible alternative to make this api function exactly as it does in windows. Waiting for an early reply, Thanks and Regards,
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...14 +141,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 *, ui...
2013 Sep 06
1
[PATCH] arm: appliance: Add support for device trees (dtb's).
This is the libguestfs companion patch to: https://www.redhat.com/archives/libguestfs/2013-September/msg00045.html Rich.
2006 Aug 25
2
RFC: non-root ssh tun access
...sh-4.3p2.orig/misc.c openssh-4.3p2/misc.c --- openssh-4.3p2.orig/misc.c 2006-01-31 05:49:28.000000000 -0500 +++ openssh-4.3p2/misc.c 2006-08-25 09:01:31.000000000 -0400 @@ -579,12 +579,15 @@ return -1; } +#if defined(SSH_TUN_LINUX) int -tun_open(int tun, int mode) +tun_open(int tun, int mode, uid_t uid) { -#if defined(CUSTOM_SYS_TUN_OPEN) - return (sys_tun_open(tun, mode)); + return (sys_tun_open(tun, mode, uid)); #elif defined(SSH_TUN_OPENBSD) +int +tun_open(int tun, int mode) +{ struct ifreq ifr; char name[100]; int fd = -1, sock; diff -Nurd openssh-4.3p2.orig/misc.h openssh-4.3p2/m...
2020 Oct 05
1
Re: [PATCH nbdkit v2 1/3] server: Add new APIs for reading the client’s SO_PEERCRED.
...nd 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 in-band...