search for: s_irwxu

Displaying 20 results from an estimated 22 matches for "s_irwxu".

2008 Oct 23
1
question about smbmount as user
...ormal user, the mountpoint has to be owned by the user and needs to have at least u=rwx. This means I can no longer set the mountpoint like so: d--------- 2 root root 4096 Oct 23 14:58 someshare After modifying line 1255 of mount.cifs.c >>> if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) { <<< into >>> if(1) { <<<, I get what I think I want. A user can mount that share and the directory mode allows accessing the directory but only if mounted. That line is not put in just to show off. This means I'm probably ov...
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
...-- rsync-2.5.5/rsync.h Mon Mar 25 02:29:43 2002 +++ rsync/rsync.h Fri Feb 7 10:02:09 2003 @@ -488,9 +488,53 @@ #define STDERR_FILENO 2 #endif +#ifndef S_ISUID +#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 +#ifnd...
2008 Oct 21
1
Create user home directory or user-own folder on samba server on first login to samba
Hello, I'd like to create user home directory or user-own folder on samba server on first login to samba without using PAM, so how could I do this? Thank you, Denis
2001 Jan 23
11
cc & no 64bit int patches
Here are a couple of patches against the CVS (Jan 22 18:41 PST) Some C++ comments found their way into ssh.h The no64.patch puts ifdefs around buffer_get_int64() now in bufaux.[c,h] -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net -------------- next part -------------- --- ssh.h.old Mon Jan 22 18:40:58 2001 +++ ssh.h Mon Jan 22 19:02:02 2001 @@ -25,8 +25,10 @@ # include
2005 Oct 11
5
scp bug: newly created dirs do not inherit sgid bit
...cp.c.orig 2005-10-11 16:50:17.000000000 +0200 +++ scp.c 2005-10-11 16:57:25.000000000 +0200 @@ -876,8 +876,12 @@ run_err("%s: set times: %s", vect[0], strerror(errno)); } - if (mod_flag) + if (mod_flag) { + if (stat(vect[0], &stb)==0) + mode= (mode & S_IRWXU) | + (stb.st_mode & ~S_IRWXU); (void) chmod(vect[0], mode); + } if (vect[0]) xfree(vect[0]); continue;
2008 Mar 20
3
[RFC PATCH 0/4] Inter-guest virtio I/O example with lguest
Hi all, Just finished my prototype of inter-guest virtio, using networking as an example. Each guest mmaps the other's address space and uses a FIFO for notifications. There are two issues with this approach. The first is that neither guest can change its mappings. See patch 1. The second is that our feature configuration is "host presents, guest chooses" which breaks
2008 Mar 20
3
[RFC PATCH 0/4] Inter-guest virtio I/O example with lguest
Hi all, Just finished my prototype of inter-guest virtio, using networking as an example. Each guest mmaps the other's address space and uses a FIFO for notifications. There are two issues with this approach. The first is that neither guest can change its mappings. See patch 1. The second is that our feature configuration is "host presents, guest chooses" which breaks
2013 Oct 16
0
[BUG] Reflinking fails for files >2GB on 32-bit platform
...t;sys/types.h> #include <fcntl.h> #include <sys/ioctl.h> #include <unistd.h> bool os_create_reflink(const char* linkname, const char* fname) { int src_desc=open(fname, O_RDONLY); if( src_desc<0) return false; int dst_desc=open(linkname, O_WRONLY | O_CREAT | O_EXCL, S_IRWXU | S_IRWXG); if( dst_desc<0 ) { close(src_desc); return false; } #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_IOC_CLONE _IOW (BTRFS_IOCTL_MAGIC, 9, int) int rc=ioctl(dst_desc, BTRFS_IOC_CLONE, src_desc); close(src_desc); close(dst_desc); return rc==0; } int main(int arg...
2003 Feb 19
0
FW: compare st_mode & 07777, or Aix dirs always differ
...ny implementation that doesn't make the file permission bits the low-order 9 bits with their usual definition is insane. Actually, I think the original definition (below), is just fine, as long as the non-POSIX-96 macro S_ISVTX is handled. #define CHMOD_BITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) We already define ACCESSPERMS as 0777 in rsync.h, so I used that macro instead of the 3 S_IRWXx macros. I applied this change, and I also update the call to do_chmod in rsync.c to also mask down the bits. rsync will no longer play with the funky system-specific bits. If p...
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...+ case S_IFLNK: + /* readlink later */ + break; case S_IFREG: + if (fd < 0 && (fd = open(name, O_RDONLY, 0)) < 0) + goto syserr; break; case S_IFDIR: @@ -586,6 +606,7 @@ syserr: run_err("%s: %s", name, strerr } #define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) - (void) sprintf(buf, "C%04o %lu %s\n", - (unsigned int) (stb.st_mode & FILEMODEMASK), + (void) sprintf(buf, "%c%04o %lu %s\n", + ((stb.st_mode & S_IFMT) == S_IFLNK) ? 'L' : 'C', + (unsigned int) (stb.st_mode &a...
2014 Aug 31
0
Bug#444000: [ijc@hellion.org.uk: move core dumps to /var/lib/xen/dump]
...fo['name_label']) + +- coredir = "/var/xen/dump/%s" % (based_name) ++ coredir = "/var/lib/xen/dump/%s" % (based_name) + if not os.path.exists(coredir): + try: + mkdir.parents(coredir, stat.S_IRWXU) +@@ -2292,7 +2292,7 @@ + + if not os.path.isdir(coredir): + # Use former directory to dump core +- coredir = '/var/xen/dump' ++ coredir = '/var/lib/xen/dump/' + + this_time = time.strftime("%Y-%m%d-%H%M.%S...
2013 Aug 16
2
Bug#706233: move core dumps to /var/lib/xen/dump
...fo['name_label']) + +- coredir = "/var/xen/dump/%s" % (based_name) ++ coredir = "/var/lib/xen/dump/%s" % (based_name) + if not os.path.exists(coredir): + try: + mkdir.parents(coredir, stat.S_IRWXU) +@@ -2292,7 +2292,7 @@ + + if not os.path.isdir(coredir): + # Use former directory to dump core +- coredir = '/var/xen/dump' ++ coredir = '/var/lib/xen/dump/' + + this_time = time.strftime("%Y-%m%d-%H%M.%S...
2012 Nov 23
14
extended attributes wiredness
Hi, I am using kernel 3.7-rc6. I have written a test application for extended attributes and have for some folders a wired behaviour: #include <stdio.h> #include <string.h> #include <attr/xattr.h> char attrs[1024]; ssize_t attrslen; int i; char value[1024]; ssize_t valuelen; int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Syntax: testxattr
2002 Jul 13
0
[PATCH]: scp program improved
...indx < argc; ++indx) { name = argv[indx]; statbytes = 0; len = strlen(name); @@ -536,14 +581,19 @@ if (response() < 0) goto next; } + if (resume_mode) + c = 'R'; + else + c = 'C'; + #define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) #ifdef HAVE_LONG_LONG_INT - snprintf(buf, sizeof buf, "C%04o %lld %s\n", + snprintf(buf, sizeof buf, "%c%04o %lld %s\n", c, (u_int) (stb.st_mode & FILEMODEMASK), (long long)stb.st_size, last); #else /* XXX: Handle integer overflow? */ -...
2000 Jun 28
1
[Patch] Shorter patch for smbfs 2.2.16
...@@ -276,6 +276,8 @@ #endif if (!S_ISDIR(inode->i_mode)) invalidate_inode_pages(inode); + else + smb_invalid_dir_cache(inode); } out: return error; @@ -379,6 +381,13 @@ mnt->dir_mode &= (S_IRWXU | S_IRWXG | S_IRWXO); mnt->dir_mode |= S_IFDIR; sb->u.smbfs_sb.mnt = mnt; + /* + * Display the enabled options + */ + if (mnt->version & SMB_FIX_OLDATTR) + printk("SMBFS: Using core getattr (Win 95 speedup)\n"); +...
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
2019 Mar 06
0
[PATCH nbdkit] Add ssh plugin using libssh.
...+ r = sftp_init (h->sftp); + if (r != SSH_OK) { + nbdkit_error ("failed to initialize sftp session: %s", + ssh_get_error (h->session)); + goto err; + } + access_type = readonly ? O_RDONLY : O_RDWR; + h->file = sftp_open (h->sftp, path, access_type, S_IRWXU); + if (!h->file) { + nbdkit_error ("cannot open file for %s: %s", + readonly ? "reading" : "writing", + ssh_get_error (h->session)); + goto err; + } + + nbdkit_debug ("opened libssh handle"); + + return h; +...
2019 Mar 06
2
[PATCH nbdkit] Add ssh plugin using libssh.
This adds a simple plugin using libssh (not libssh2). The intended use for this is with virt-v2v when sourcing guests from VMware over SSH. We've had several years of problems getting our libssh-based driver into qemu. By putting it into nbdkit instead we can bypass that. However this also lets us combine ssh access with filters, in particular the recently written ‘rate’ filter. Rich.
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...#39;-'); +} + +/* Converts st_mode to an ls-style string + * st_mode mode to convert + * st_mode_str string to hold converted string + */ +void rosh_st_mode2str(mode_t st_mode, char *st_mode_str) +{ + st_mode_str[0] = rosh_d_type2char_lspre(IFTODT(st_mode)); + rosh_st_mode_am2str((st_mode & S_IRWXU) >> 6, st_mode_str + 1); + rosh_st_mode_am2str((st_mode & S_IRWXG) >> 3, st_mode_str + 4); + rosh_st_mode_am2str(st_mode & S_IRWXO, st_mode_str + 7); + st_mode_str[10] = 0; +} /* rosh_st_mode2str */ + +/* Output a single entry + * filestr directory name to list + * de directory...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...#39;); +} + +/* Converts st_mode to an ls-style string + * st_mode mode to convert + * st_mode_str string to hold converted string + */ +void rosh_st_mode2str(mode_t st_mode, char *st_mode_str) +{ + st_mode_str[0] = rosh_d_type2char_lspre(IFTODT(st_mode)); + rosh_st_mode_am2str((st_mode & S_IRWXU) >> 6, st_mode_str + 1); + rosh_st_mode_am2str((st_mode & S_IRWXG) >> 3, st_mode_str + 4); + rosh_st_mode_am2str(st_mode & S_IRWXO, st_mode_str + 7); + st_mode_str[10] = 0; +} /* rosh_st_mode2str */ + +/* Output a single entry + * filestr directory name to list + * d...