search for: st_uid

Displaying 20 results from an estimated 222 matches for "st_uid".

Did you mean: st_gid
2001 Apr 22
1
relaxing access rights verifications
...---- next part -------------- diff -ur openssh-2.5.2p2.orig/auth-rhosts.c openssh-2.5.2p2/auth-rhosts.c --- openssh-2.5.2p2.orig/auth-rhosts.c Fri Feb 9 03:11:24 2001 +++ openssh-2.5.2p2/auth-rhosts.c Sun Apr 22 01:19:56 2001 @@ -215,7 +215,8 @@ } if (options.strict_modes && ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0)) { + (st.st_uid == 0 && (st.st_mode & 002) != 0) || + (st.st_uid != 0 && (st.st_mode & 022) != 0))) { log("Rhosts authentication refused for %.100s: bad ownership or modes fo...
2008 Sep 15
0
Trace log of unify when glusterfs freezes
...ol.c:280:client_protocol_xfer] brick-ns: attempting to pipeline request type(1) op(34) with handshake 2008-09-15 20:16:53 T [trace.c:535:trace_lookup_cbk] trace: callid: 2 (*this=0x50cd30, op_ret=0, op_errno=2, inode=0x5266a0, *buf=0x526ab0 {st_dev=2049, st_ino=1242079, st_mode=16877, st_nlink=13, st_uid=0, st_gid=0, st_rdev=0, st_size=4096, st_blksize=4096, st_blocks=16}) 2008-09-15 20:16:55 T [trace.c:1117:trace_lookup] trace: callid: 3 (*this=0x50cd30, loc=0x526768 {path=/, inode=0x5266a0} ) 2008-09-15 20:16:55 T [trace.c:535:trace_lookup_cbk] trace: callid: 3 (*this=0x50cd30, op_ret=0, op_err...
2003 Mar 20
2
--link-dest uid/gid checking bug?
...f skip_file() in generator.c. Because I wasn't supplying the --owner or --group options, the preserve_uid and preserve_gid flags were not set, and the source file's file->uid and file->gid values were just 0. But skip_file() was checking them against the destination file's st->st_uid and st->st_gid, and reporting the difference. Here's my stab at a patch -- I only just looked at the rsync code today, so I might very well be missing something. Thanks, Chris. diff -u generator.c.orig generator.c ==================================== --- generator.c.orig 2003-03-19 1...
2014 Jun 12
2
[PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
...letions(-) diff --git a/src/fuse.c b/src/fuse.c index dd63729..292ebee 100644 --- a/src/fuse.c +++ b/src/fuse.c @@ -301,21 +301,42 @@ mount_local_access (const char *path, int mask) fuse = fuse_get_context (); - if (mask & R_OK) - ok = ok && - ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IRUSR - : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IRGRP - : statbuf.st_mode & S_IROTH); - if (mask & W_OK) - ok = ok && - ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IWUSR - : fuse->gid == statb...
2007 Sep 07
0
Public key reading abstraction (to allow future work)
...th(file, buf) == NULL) { - snprintf(err, errlen, "realpath %s failed: %s", file, - strerror(errno)); - return -1; - } - if (realpath(pw->pw_dir, homedir) != NULL) - comparehome = 1; - - /* check the open file to avoid races */ - if (fstat(fileno(f), &st) < 0 || - (st.st_uid != 0 && st.st_uid != uid) || - (st.st_mode & 022) != 0) { - snprintf(err, errlen, "bad ownership or modes for file %s", - buf); - return -1; - } - - /* for each component of the canonical path, walking upwards */ - for (;;) { - if ((cp = dirname(buf)) == NULL) { -...
2020 May 25
2
Question about smbc_stat() and smbc_statvfs() in libsmbclient
I?ve been writing some code that uses libsmbclient to talk to SMB servers and I?m a little bit confused why ?smbc_stat()? sets the st_uid & st_gid to the uid & gid of the process calling it, instead of trying to map the real owner & group of the path or setting it to -1:-1 if it can?t do that... But there is probably some good reason for this? Ie, if I call something like this: > main() { > struct stat sb; >...
2000 Oct 11
1
Bug in OpenSSH 2.2.0p1
In line 542 of entropy.c is the owner of the PRNG seedfile checked. Root is also a valid owner of this file. So the line must be: if (((st.st_mode & 0177) != 0) || !( (st.st_uid == original_uid) || (st.st_uid == 0) ) ) Regards, Martin --- Martin Luig email: email at Martin-Luig.de
2003 Apr 08
1
link_dest checks perms despite no -p -o or -g
...t, this block of code in skip_file causes new copies of files to be created if source and destination file permissions differ, even if -p -o and -g haven't been specified. if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { return 0; } if (st->st_uid != file->uid || st->st_gid != file->gid) { return 0; } } I think the code should be this instead. if (link_dest) { if(preserve_perms && ((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT))) { return 0; } if ((preserve_uid && (st->st...
2012 Feb 21
2
chroot directory ownership
Currently, sshd requires the chroot directory to be owned by root. This makes it impossible to chroot users into their own home directory, which would be convenient for sftp-only users. Is there a particular reason why, in safely_chroot() in session.c, if (st.st_uid != 0 || (st.st_mode & 022) != 0) fatal("bad ownership or modes for chroot " "directory %s\"%s\"", cp == NULL ? "" : "component ", component); can't be changed...
2002 Jun 26
3
OpenSSH 3.4 released
OpenSSH 3.4 has just been released. It will be available from the mirrors listed at http://www.openssh.com/ shortly. OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0 implementation and includes sftp client and server support. We would like to thank the OpenSSH community for their continued support and encouragement. Changes since OpenSSH 3.3: ============================
2010 Jul 19
1
Oplocks
...nly sometimes? I have strace logs showing: Wrong case: 8711 14:57:50.765677 open("Y_odloz/D8/D8_03_Ivet_98/06aa6459-a011-40f8-bfb1-25d15e7ada61", O_RDWR|O_CREAT|O_EXCL, 0744) = 121 8711 14:57:50.766030 fstat(121, {st_dev=makedev(0, 23), st_ino=3079419, st_mode=S_IFREG|0744, st_nlink=1, st_uid=40022, st_gid=400, st_blksize=262144, st_blocks=0, st_size=0, st_atime=2010/07/13-14:57:50, st_mtime=2010/07/13-14:57:50, st_ctime=2010/07/13-14:57:50}) = 0 8711 14:57:50.766129 fcntl(12, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=8260, len=1}) = 0 8711 14:57:50.766214 fcntl(121, F_SETSIG, 0...
2020 May 28
2
Question about smbc_stat() and smbc_statvfs() in libsmbclient
Re: the smbc_stat() returning wrong st_uid/st_gid: Yeah, I get why it?s difficult, but perhaps it should just return -1/-1 instead? It too is wrong but probably less confusing than seeing the local user?s uid/gid there?? Anyway, I?ve been working on a ?grand unifying :-)? ACL managing (CLI) tool since I got tired of all the different and q...
2001 Jun 04
1
[PATCH]: Add check_ntsec to ownership/mode tests
...rhosts.c 2001/04/12 23:34:35 1.17 +++ auth-rhosts.c 2001/06/04 10:05:34 @@ -228,6 +228,9 @@ auth_rhosts2(struct passwd *pw, const ch pw->pw_name, pw->pw_dir); return 0; } +#ifdef HAVE_CYGWIN + if (check_ntsec(pw->pw_dir)) +#endif if (options.strict_modes && ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0)) { Index: auth-rsa.c =================================================================== RCS file: /cvs/openssh_cvs/auth-rsa.c,v retrieving revision 1.31 diff -u -p -r1.31 auth-rsa.c --- auth-rsa.c 2001/04/08 18:27:0...
2011 Jan 16
0
fs quota backend bug
..."INBOX" QUOTAROOT "INBOX" Ok Getquotaroot completed Part of strace: read(0, "357 getquotaroot \"INBOX\"\r\n", 1259) = 26 stat("/home/vmail/ofight.org/team at ofight.org/tmp", {st_dev=makedev(253, 2), st_ino=475158, st_mode=S_IFDIR|0700, st_nlink=2, st_uid=1042, st_gid=102, st_b lksize=4096, st_blocks=0, st_size=1, st_atime=2011/01/16-10:07:59, st_mtime=2011/01/16-10:07:59, st_ctime=2011/01/16-10:07:59}) = 0 stat("/home/vmail/ofight.org/team at ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=10...
2005 Mar 05
2
dovecot-pgsql.conf can't find in chroot? (debian)
...<... open resumed> ) = 5 [pid 18213] <... fcntl64 resumed> ) = 0 [pid 18211] fstat64(5, <unfinished ...> [pid 18209] <... fcntl64 resumed> ) = 0 [pid 18211] <... fstat64 resumed> {st_dev=makedev(22, 1), st_ino=917830, st_mode=S_IFREG|060 0, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4264, st_atime=200 5/03/04-22:09:07, st_mtime=2005/03/04-22:09:06, st_ctime=2005/03/04-22:09:06}) = 0 [pid 18211] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0 x40019000 [pid 18211] fstat64(5, {st_dev=makedev(...
2001 Jul 11
1
RFD: uid of privileged user not fixed to 0
.... May I propose to change the usage of uid 0 in the sources to become substituted by a define as above which would allow to configure that for different systems which doesn't neccessarily have the uid 0 and a root user at all? Instead of constant (and badly portable) comparisons like if (st.st_uid == 0) we could use something like if (is_root(st.st_uid)) which would allow macros like the following on Unices: #define ROOT_UID 0 #define is_root(x) ((x) == ROOT_UID) and other definitions on other systems: #define ROOT_UID 18 /* "SYSTEM" account on NT/W2K */ and even functio...
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...nt64_perms (stat->st_mode & 07777); - output_int64_size (stat->size); + output_int64_size (stat->st_size); /* Display extra fields when enabled. */ if (enable_uids) { - output_int64_uid (stat->uid); - output_int64_uid (stat->gid); + output_int64_uid (stat->st_uid); + output_int64_uid (stat->st_gid); } if (enable_times) { - output_int64_time (stat->atime); - output_int64_time (stat->mtime); - output_int64_time (stat->ctime); + output_int64_time (stat->st_atime_sec, stat->st_atime_nsec); + output_int64_time (stat-&g...
2015 Jan 02
2
(no subject)
Hi, we needed these changes when we had to build a guest image compatible with a starting guest image but not backed by it in any way? We needed some tool to check our progress, comparing original and? rebuilt (from scratch) images, and virt-diff seemed the best option, but? we had to soften the comparison to reduce the noise in the output. I added some options to ignore certain informations when
2015 Mar 08
1
dovecot auth-worker error happens when I enabled the dovecot to consider both the system account and the MySQL virtual mailbox databases.
...executable: /usr/lib/dovecot/auth (command line "dovecot/auth -w") ERROR: apport (pid 29249) Mon Mar 9 01:26:31 2015: Unhandled exception: Traceback (most recent call last): File "/usr/share/apport/apport", line 391, in <module> if is_closing_session(pid, pidstat.st_uid): File "/usr/share/apport/apport", line 213, in is_closing_session env = e.read().split('\0') File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can&...
2005 May 16
2
Assertion Failure in mbox-sync.c
...in main (argc=1, argv=0xbffffa44, envp=0xbffffa4c) at main.c:228 I'm not sure about the variables here, the core file's still here if any other info will help: (gdb) p sync_ctx->input->real_stream->statbuf $5 = {st_dev = 0, __pad1 = 0, __st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 4294967295, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 1116279667, tv_nsec = 0}, st_mtim = {tv_sec = 1116279667, tv_nsec = 0}, st_ctim = { tv_sec = 1116279667, tv_nsec = 0}, st_ino = 0} (gdb) p sync_ctx->file_input->v_offs...