Displaying 20 results from an estimated 83 matches for "s_irgrp".
2016 Apr 10
1
[PATCH] module parameters: permissions as defines, readable to everyone
...permissions 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...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...name(struct 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...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...name(struct 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...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...name(struct 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...
2016 Aug 02
2
[PATCH 0904/1285] Replace numeric parameter like 0444 with macro
.....56d3671 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
.....56d3671 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
...b/drivers/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 + VLA...
2016 Aug 02
0
[PATCH 0753/1285] Replace numeric parameter like 0444 with macro
...b/drivers/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 + VLA...
2015 Nov 13
4
[PATCH 1/4] extlinux: simplification
...asprintf(&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...
2003 Nov 23
1
[PATCH] dd O_CREAT permission
...ine ARRAY_SIZE(x) (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
...ere is a patch 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-...
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
...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_IROTH 00004
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 00002
+#endif
+#ifndef S_IXOTH
+#define S_...
2009 Sep 09
3
DO NOT REPLY [Bug 6701] New: permission of attributes are not preserved
...nerships
diff --git a/lib/sysxattrs.c b/lib/sysxattrs.c
index d55ee0c..c9a38cd 100644
--- a/lib/sysxattrs.c
+++ b/lib/sysxattrs.c
@@ -191,7 +191,7 @@ int sys_lsetxattr(const char *path, const char *name, const
{
int attrfd;
size_t bufpos;
- mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
+ mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH;
if ((attrfd = attropen(path, name, O_CREAT|O_TRUNC|O_WRONLY, mode)) <
0)
return -1;
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving thi...
2014 Jun 12
2
[PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
...c/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 == statbuf.st_gid ? statbuf.st_mode & S_IWGRP
- : statbuf.st_mode & S_IWOTH);
- if (mask & X_O...
2009 Mar 05
1
[PATCH 4/5] COM32: add trivial stat() function
...uct 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 */
+ }
+ }
+ return re...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
..., S_IRUGO|S_IWUSR, part_fail_show, part_fail_store);
+ __ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
#endif
static struct attribute *part_attrs[] = {
@@ -291,8 +290,7 @@ static ssize_t whole_disk_show(struct device *dev,
{
return 0;
}
-static DEVICE_ATTR(whole_disk, S_IRUSR | S_IRGRP | S_IROTH,
- whole_disk_show, NULL);
+static DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
/*
* Must be called either with bd_mutex held, before a disk can be opened or
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 55d9ff54ce15..b7e4aa624667 100644
--- a/driver...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
..., S_IRUGO|S_IWUSR, part_fail_show, part_fail_store);
+ __ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
#endif
static struct attribute *part_attrs[] = {
@@ -291,8 +290,7 @@ static ssize_t whole_disk_show(struct device *dev,
{
return 0;
}
-static DEVICE_ATTR(whole_disk, S_IRUSR | S_IRGRP | S_IROTH,
- whole_disk_show, NULL);
+static DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
/*
* Must be called either with bd_mutex held, before a disk can be opened or
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 55d9ff54ce15..b7e4aa624667 100644
--- a/driver...
2004 Feb 20
1
ocfs hung
...de_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
link_cn...
2016 Aug 02
0
[PATCH 0095/1285] Replace numeric parameter like 0444 with macro
...block/virtio_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
...st/net.c b/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