search for: s_ixusr

Displaying 20 results from an estimated 33 matches for "s_ixusr".

Did you mean: s_iwusr
2010 Aug 10
1
samba posix_acls.c file and dir permissions
...ase help me in understanding these. 1) in samba posix_acls.c why samba always setting the READ access for the file and READ and WRITE access for directory ? ---------- case S_IRUSR: /* Ensure owner has read access. */ pace->perms |= S_IRUSR; if (is_directory) pace->perms |= (S_IWUSR|S_IXUSR); and_bits = unix_perms_to_acl_perms(and_bits, S_IRUSR, S_IWUSR, S_IXUSR); or_bits = unix_perms_to_acl_perms(or_bits, S_IRUSR, S_IWUSR, S_IXUSR); ----------- 2) I have connected a samba share from the device onto my windows xp machine.. when I tried modify subfolder owner write permissions ,...
2010 Jul 31
3
Alternative to Samba by Link***?
Hello I vaguely remember reading an article months ago about some fork or altnernative provider of Samba called something like Link***. The Wikipedia article on Samba only mentions TNG. http://en.wikipedia.org/wiki/Samba_%28software%29 Does someone know what I'm refering to and could tell me more? Thank you.
1999 Jul 02
1
preexec: return code not used? (PR#18576)
T.D.Lee@durham.ac.uk wrote: > > > But we'd like to go one step further and have the return code from preexec > be used to continue or abort the connection being established. The script > above would be modified to generate this return code. > > Looking through the source code (smbd/service.c), it doesn't seem to check > the return code (calling smbrun to do the
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
...define S_ISUID 04000 +#endif +#ifndef S_ISGID +#define S_ISGID 02000 +#endif +#ifndef S_ISVTX +#define S_ISVTX 01000 +#endif +#ifndef S_IRWXU +#define S_IRWXU 00700 +#endif +#ifndef S_IRUSR +#define S_IRUSR 00400 +#endif #ifndef S_IWUSR -#define S_IWUSR 0200 +#define S_IWUSR 00200 +#endif +#ifndef S_IXUSR +#define S_IXUSR 00100 +#endif +#ifndef S_IRWXG +#define S_IRWXG 00070 +#endif +#ifndef S_IRGRP +#define S_IRGRP 00040 +#endif +#ifndef S_IWGRP +#define S_IWGRP 00020 +#endif +#ifndef S_IXGRP +#define S_IXGRP 00010 +#endif +#ifndef S_IRWXO +#define S_IRWXO 00007 +#endif +#ifndef S_IROTH +#define S_...
2001 Jun 18
2
Patch for changing expired passwords
...1 *************** *** 68,83 **** shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; /* deny if shell does not exists or is not executable */ ! if (stat(shell, &st) != 0) return 0; ! if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0; /* Return false if user is listed in DenyUsers */ if (options.num_deny_users > 0) { for (i = 0; i < options.num_deny_users; i++) ! if (match_pattern(pw->pw_name, options.deny_users[i])) return 0; } /* Return false if AllowUsers isn'...
2014 Jun 12
2
[PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
...( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IWUSR - : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IWGRP - : statbuf.st_mode & S_IWOTH); - if (mask & X_OK) - ok = ok && - ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IXUSR - : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IXGRP - : statbuf.st_mode & S_IXOTH); + /* Root user should be able to access everything, so only bother + * with these fine-grained tests for non-root. (RHBZ#1106548). + */ + if (fuse->uid != 0) { + if (mask...
2003 Mar 06
1
ACL bug FIXes for get_nt_acl()
Two attached patches for samba 2.2.7a and 3.0-alfa22, that I've made today, fix 3 bugs mentioned in my previous e-mail. 1) For each file in addition to ALLOW ACE proper DENY ACE is created. 2) "Take ownership" is shown DENIED for all except root ACEs 3) Read Permissions and read attributes are always shown as allowed, as they are actually allowed. -- Zhitomirsky
2009 Mar 05
1
[PATCH 4/5] COM32: add trivial stat() function
...char *pathname, struct stat *buf) +{ + int fd, status, ret; + DIR *d; + mode_t st_mode; + + fd = open(pathname, O_RDONLY); + if (fd != -1){ + status = fstat(fd, buf); + close(fd); + ret = 0; + } else { + if ((errno == 0) || (errno == ENOENT)) { + errno = 0; + st_mode = (S_IFDIR | S_IRUSR | S_IXUSR); + /* | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) + */ + d = opendir(pathname); + if (d != NULL) { + buf->st_size = 0; + buf->st_mode = st_mode; + closedir(d); + ret = 0; + } else { + ret = -1; /* Preserve errno */ + } + } else { + ret = -1; /* Preserve errno */...
2004 Feb 20
1
ocfs hung
...oin_node_map = 00000000000000000000000000000000 seq_num = 0 local_ext = false granularity = 0 filename = prod filename_len = 4 file_size = 131072 alloc_size = 131072 attribs = OCFS_ATTRIB_DIRECTORY prot_bits = S_IRUSR S_IWUSR S_IXUSR S_IRGRP S_IXGRP S_IROTH S_IXOTH uid = 510 gid = 500 create_time = Wed Jan 14 11:29:16 2004 modify_time = Wed Jan 14 11:29:16 2004 dir_node_ptr = 16179200 this_sector = 16179712 last_ext_ptr = 0 sync_flags = OCFS_SYNC_FLAG_VALID...
2009 Mar 06
0
[PATCH 3/3] COM32/stat(): preset ret and move zeroing errno
...(fd != -1){ status = fstat(fd, buf); + /* terr = errno; */ /* FIXME:should fstat()'s error be + preserved over close()'s error? */ close(fd); + /* errno = terr; */ ret = 0; } else { if ((errno == 0) || (errno == ENOENT)) { - errno = 0; st_mode = (S_IFDIR | S_IRUSR | S_IXUSR); /* | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) - */ + */ /* FIXME: Should these modes be included? */ d = opendir(pathname); if (d != NULL) { + errno = 0; /* No real error occurred */ buf->st_size = 0; buf->st_mode = st_mode; closedir(d); ret = 0; -...
2010 Jun 21
0
would like more detail when /tmp directory is missing. patch for linux/syslinux.c
...@@ int main(int argc, char *argv[]) Make a temp dir and pass all the gunky options to mount. */ if (chdir(_PATH_TMP)) { - perror(program); + fprintf(stderr, "%s: Cannot access the %s directory.\n", + program, _PATH_TMP); exit(1); } #define TMP_MODE (S_IXUSR|S_IWUSR|S_IXGRP|S_IWGRP|S_IWOTH|S_IXOTH|S_ISVTX)
2000 Mar 31
0
[PATCH] empty shell in /etc/passwd
.../ - if (stat(pw->pw_shell, &st) != 0) + /* deny if shell is not executable, empty shell defaults to /bin/sh */ + shell = pw->pw_shell[0] ? _PATH_BSHELL : pw->pw_shell; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0;
2000 Mar 31
1
[PATCH] Correction empty shell-field patch
...- if (stat(pw->pw_shell, &st) != 0) + /* deny if shell is not executable, empty shell defaults to /bin/sh */ + shell = pw->pw_shell[0] ? pw->pw_shell : _PATH_BSHELL; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0;
2000 Apr 15
0
patch in user validation code
...at "" == "/bin/sh", as specified in passwd(5) */ + if (!pw->pw_shell || !strlen(pw->pw_shell)) + shell = _PATH_BSHELL; + else + shell = pw->pw_shell; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0; -- vsync http://quadium.net/ Orjner.
2005 Jan 27
1
Recycler problem
Hi folks, I have Samba 3.0.10 with SuSE 9.1 running and a problem with the recycler feature of Samba. Following setup: - User A deletes file F1 in directory D - Samba produces file .recycler/D/F1 - D has permissions -rwx------, F1 has permissions -rwxrw-r-- (owner A) - User B deletes file F2 in directory D - F2 doesn't show up in .recycler/D So all files User B deletes in directory D are
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,
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Fix "test -x" as root on FreeBSD 8
...static inline intmax_t getn(const char *s) { return atomax10(s); @@ -493,8 +501,20 @@ equalf (const char *f1, const char *f2) } #ifdef HAVE_FACCESSAT +static int has_exec_bit_set(const char *path) +{ + struct stat64 st; + + if (stat64(path, &st)) + return 0; + return st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH); +} + static int test_file_access(const char *path, int mode) { + if (faccessat_confused_about_superuser() && + mode == X_OK && geteuid() == 0 && !has_exec_bit_set(path)) + return 0; return !faccessat(AT_FDCWD, path, mode, AT_EACCESS); } #else...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Fix "test -x" as root on FreeBSD 8
...static inline intmax_t getn(const char *s) { return atomax10(s); @@ -493,8 +501,20 @@ equalf (const char *f1, const char *f2) } #ifdef HAVE_FACCESSAT +static int has_exec_bit_set(const char *path) +{ + struct stat64 st; + + if (stat64(path, &st)) + return 0; + return st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH); +} + static int test_file_access(const char *path, int mode) { + if (faccessat_confused_about_superuser() && + mode == X_OK && geteuid() == 0 && !has_exec_bit_set(path)) + return 0; return !faccessat(AT_FDCWD, path, mode, AT_EACCESS); } #else...
2003 Jan 07
2
Test for locked account in auth.c (bug #442).
Hi Damien, I noticed you merged a couple of ifdefs in the fix for bug #442. The cvs comment says "Fix Bug #442 for PAM case". The code is now roughly: #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) spw = getspnam(pw->pw_name); passwd = spw->sp_pwdp; #else passwd =
2009 May 29
1
[PATCH v2] klibc-utils: add simple ls
...-'); break; + default: putchar('?'); break; + } + putchar(STAT_ISSET(st->st_mode, S_IRUSR) ? 'r' : '-'); + putchar(STAT_ISSET(st->st_mode, S_IWUSR) ? 'w' : '-'); + + !STAT_ISSET(st->st_mode, S_ISUID) ? + putchar(STAT_ISSET(st->st_mode, S_IXUSR) ? 'x' : '-') : + putchar('S'); + + putchar(STAT_ISSET(st->st_mode, S_IRGRP) ? 'r' : '-'); + putchar(STAT_ISSET(st->st_mode, S_IWGRP) ? 'w' : '-'); + + !STAT_ISSET(st->st_mode, S_ISGID) ? + putchar(STAT_ISSET(st->st_mode, S_IXGRP...