public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 lib/activate/fs.c libdm/libdevmapper.h li ...
@ 2009-09-25 11:58 prajnoha
0 siblings, 0 replies; only message in thread
From: prajnoha @ 2009-09-25 11:58 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha@sourceware.org 2009-09-25 11:58:01
Modified files:
lib/activate : fs.c
libdm : libdevmapper.h
libdm/ioctl : libdm-iface.c
Log message:
Use the same default umask for /dev dirs (DM_DEV_DIR_UMASK).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdevmapper.h.diff?cvsroot=lvm2&r1=1.96&r2=1.97
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.61&r2=1.62
--- LVM2/lib/activate/fs.c 2009/08/05 09:12:44 1.47
+++ LVM2/lib/activate/fs.c 2009/09/25 11:58:00 1.48
@@ -29,6 +29,7 @@
static int _mk_dir(const char *dev_dir, const char *vg_name)
{
char vg_path[PATH_MAX];
+ mode_t old_umask;
if (dm_snprintf(vg_path, sizeof(vg_path), "%s%s",
dev_dir, vg_name) == -1) {
@@ -41,10 +42,14 @@
return 1;
log_very_verbose("Creating directory %s", vg_path);
+
+ old_umask = umask(DM_DEV_DIR_UMASK);
if (mkdir(vg_path, 0777)) {
log_sys_error("mkdir", vg_path);
+ umask(old_umask);
return 0;
}
+ umask(old_umask);
return 1;
}
--- LVM2/libdm/libdevmapper.h 2009/08/06 15:04:30 1.96
+++ LVM2/libdm/libdevmapper.h 2009/09/25 11:58:00 1.97
@@ -1026,4 +1026,6 @@
int dm_udev_complete(uint32_t cookie);
int dm_udev_wait(uint32_t cookie);
+#define DM_DEV_DIR_UMASK 0022
+
#endif /* LIB_DEVICE_MAPPER_H */
--- LVM2/libdm/ioctl/libdm-iface.c 2009/08/06 15:02:01 1.61
+++ LVM2/libdm/ioctl/libdm-iface.c 2009/09/25 11:58:00 1.62
@@ -234,7 +234,7 @@
if (!major)
return 0;
- old_umask = umask(0022);
+ old_umask = umask(DM_DEV_DIR_UMASK);
ret = dm_create_dir(dm_dir());
umask(old_umask);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-25 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-25 11:58 LVM2 lib/activate/fs.c libdm/libdevmapper.h li prajnoha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).