Displaying 20 results from an estimated 80 matches for "s_iroth".
2016 Apr 10
1
[PATCH] module parameters: permissions as defines, readable to everyone
...ons of the corresponding files in sysfs in predefined S_I* form rather than in octal notation.
Withal it makes the source code more consistent.
Moreover, because all parameters are readable to everyone, it is more user-friendly.
$ grep S_IRUGO include/linux/stat.h
#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
$ grep 'S_IRUSR\|S_IRGRP\|S_IROTH' include/uapi/linux/stat.h
#define S_IRUSR 00400
#define S_IRGRP 00040
#define S_IROTH 00004
$ ls -l /sys/module/nouveau/parameters/
total 0
-r--r--r--. 1 root root 4096 Apr 10 17:43 config
-r--r--r--. 1 root root 4096 Apr 10 17:43 debug
-r--r--r--. 1 ro...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...t device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t nodename_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename);
}
-static DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_nodename, NULL);
-static ssize_t xendev_show_devtype(struct device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t devtype_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(de...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...t device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t nodename_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename);
}
-static DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_nodename, NULL);
-static ssize_t xendev_show_devtype(struct device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t devtype_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(de...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...t device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t nodename_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename);
}
-static DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_nodename, NULL);
-static ssize_t xendev_show_devtype(struct device *dev,
- struct device_attribute *attr, char *buf)
+static ssize_t devtype_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%s\n", to_xenbus_device(de...
2016 Aug 02
2
[PATCH 0904/1285] Replace numeric parameter like 0444 with macro
...100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -1074,7 +1074,7 @@ static unsigned long devs_no_auto[__MAX_SSID + 1][__DEV_WORDS];
static char *no_auto = "";
-module_param(no_auto, charp, 0444);
+module_param(no_auto, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(no_auto, "list of ccw bus id ranges not to be auto-onlined");
static int virtio_ccw_check_autoonline(struct ccw_device *cdev)
--
2.9.2
2016 Aug 02
2
[PATCH 0904/1285] Replace numeric parameter like 0444 with macro
...100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -1074,7 +1074,7 @@ static unsigned long devs_no_auto[__MAX_SSID + 1][__DEV_WORDS];
static char *no_auto = "";
-module_param(no_auto, charp, 0444);
+module_param(no_auto, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(no_auto, "list of ccw bus id ranges not to be auto-onlined");
static int virtio_ccw_check_autoonline(struct ccw_device *cdev)
--
2.9.2
2016 Aug 02
0
[PATCH 0753/1285] Replace numeric parameter like 0444 with macro
...net/virtio_net.c
index e0638e5..39815e4 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -30,11 +30,11 @@
#include <net/busy_poll.h>
static int napi_weight = NAPI_POLL_WEIGHT;
-module_param(napi_weight, int, 0444);
+module_param(napi_weight, int, S_IRUSR | S_IRGRP | S_IROTH);
static bool csum = true, gso = true;
-module_param(csum, bool, 0444);
-module_param(gso, bool, 0444);
+module_param(csum, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gso, bool, S_IRUSR | S_IRGRP | S_IROTH);
/* FIXME: MTU in config. */
#define GOOD_PACKET_LEN (ETH_HLEN + VLAN_HLEN + E...
2016 Aug 02
0
[PATCH 0753/1285] Replace numeric parameter like 0444 with macro
...net/virtio_net.c
index e0638e5..39815e4 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -30,11 +30,11 @@
#include <net/busy_poll.h>
static int napi_weight = NAPI_POLL_WEIGHT;
-module_param(napi_weight, int, 0444);
+module_param(napi_weight, int, S_IRUSR | S_IRGRP | S_IROTH);
static bool csum = true, gso = true;
-module_param(csum, bool, 0444);
-module_param(gso, bool, 0444);
+module_param(csum, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gso, bool, S_IRUSR | S_IRGRP | S_IROTH);
/* FIXME: MTU in config. */
#define GOOD_PACKET_LEN (ETH_HLEN + VLAN_HLEN + E...
2015 Nov 13
4
[PATCH 1/4] extlinux: simplification
...&file, "%s%sldlinux.c32",
+ path, path[0] && path[strlen(path) - 1] == '/' ? "" : "/");
+ if (rv < 0 || !file) {
+ perror(program);
+ return 1;
+ }
+
+ fd = open(file, O_WRONLY | O_TRUNC | O_CREAT | O_SYNC,
+ S_IRUSR | S_IRGRP | S_IROTH);
+ if (fd < 0) {
+ perror(file);
+ free(file);
+ return 1;
+ }
+
+ rv = xpwrite(fd, (const char _force *)syslinux_ldlinuxc32,
+ syslinux_ldlinuxc32_len, 0);
+ if (rv != (int)syslinux_ldlinuxc32_len) {
+ fprintf(stderr, "%s: write failure on %s\n", program, file);
+ rv =...
2003 Nov 23
1
[PATCH] dd O_CREAT permission
...) (sizeof(x) / sizeof(x[0]))
@@ -483,7 +485,7 @@ int main(int argc, char *argv[])
* Open the output file, if specified.
*/
if (OPT_OF->str) {
- wr_fd = open(OPT_OF->str, O_RDWR|O_CREAT);
+ wr_fd = open(OPT_OF->str, O_RDWR|O_CREAT,~umask(0) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH));
if (wr_fd == -1) {
perror("open output file");
return 1;
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n?RNBERG
2005 Feb 26
1
[patch] fixes for avi2vp3
...atch that fixes various bugs/problems with avi2vp3:
1. open() is not called with O_BINARY , this causes the program to
crash or give undesired results on win32 (and maybe other
platforms?), as binary mode is not default.
2. win32 does not understand chmod flags, ie:
(S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
3. buffer = malloc(AVI_max_video_chunk(avifile));
for some reason, AVI_max_video_chunk(avifile) returns 0, i've
set an arbitrary high value for it until someone fixes it
correctly.
-- Nehal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avi2vp3-fixes-neha...
2020 Sep 25
0
[RFC PATCH 01/19] tools/virtiofsd: add support for --socket-group
...n *se)
/*
* Unfortunately bind doesn't let you set the mask on the socket,
- * so set umask to 077 and restore it later.
+ * so set umask appropriately and restore it later.
*/
- old_umask = umask(0077);
+ if (se->vu_socket_group) {
+ old_umask = umask(S_IROTH | S_IWOTH | S_IXOTH);
+ } else {
+ old_umask = umask(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH);
+ }
if (bind(listen_sock, (struct sockaddr *)&un, addr_len) == -1) {
fuse_log(FUSE_LOG_ERR, "vhost socket bind: %m\n");
close(listen_soc...
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
...if
+#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_IROTH 00004
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 00002
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 00001
#endif
+
+#define CHMOD_BITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
#ifndef _S_IFMT
#define _S_IFMT 0170000
--
Roderick Schertler
roderick@argon....
2014 Jun 12
2
[PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
...al_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 == statbuf.st_gid ? statbuf.st_mode & S_IWGRP
- : statbuf.st_mode & S_IWOTH);
- if (mask & X_OK)
- ok = ok &&
- ( fus...
2009 Mar 05
1
[PATCH 4/5] COM32: add trivial stat() function
...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 */
+ }
+ }
+ return ret;
+} /* stat */
2004 Feb 20
1
ocfs hung
...0000000000000000000000000
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
link_cnt = 0
ne...
2016 Aug 02
0
[PATCH 0095/1285] Replace numeric parameter like 0444 with macro
...io_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -561,7 +561,7 @@ static struct blk_mq_ops virtio_mq_ops = {
};
static unsigned int virtblk_queue_depth;
-module_param_named(queue_depth, virtblk_queue_depth, uint, 0444);
+module_param_named(queue_depth, virtblk_queue_depth, uint, S_IRUSR | S_IRGRP | S_IROTH);
static int virtblk_probe(struct virtio_device *vdev)
{
--
2.9.2
2016 Aug 02
0
[PATCH 0991/1285] Replace numeric parameter like 0444 with macro
.../drivers/vhost/net.c
index f744eeb..e6d5620 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -31,7 +31,7 @@
#include "vhost.h"
static int experimental_zcopytx = 1;
-module_param(experimental_zcopytx, int, 0444);
+module_param(experimental_zcopytx, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;"
" 1 -Enable; 0 - Disable");
--
2.9.2
2016 Aug 02
0
[PATCH 0992/1285] Replace numeric parameter like 0444 with macro
...drivers/vhost/vhost.c
index 669fef1..bf338d1 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -31,7 +31,7 @@
#include "vhost.h"
static ushort max_mem_regions = 64;
-module_param(max_mem_regions, ushort, 0444);
+module_param(max_mem_regions, ushort, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(max_mem_regions,
"Maximum number of memory regions in memory map. (default: 64)");
--
2.9.2
2016 Aug 02
0
[PATCH 1024/1285] Replace numeric parameter like 0444 with macro
...x d9a9058..f7d2262 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -22,7 +22,7 @@
static bool force_legacy = false;
#if IS_ENABLED(CONFIG_VIRTIO_PCI_LEGACY)
-module_param(force_legacy, bool, 0444);
+module_param(force_legacy, bool, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(force_legacy,
"Force legacy mode for transitional virtio 1 devices");
#endif
--
2.9.2