public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/misc/lvm-file.c
@ 2004-06-19 19:24 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2004-06-19 19:24 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-06-19 19:24:33
Modified files:
. : WHATS_NEW
lib/misc : lvm-file.c
Log message:
Fix sync_dir() when no / in filename.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.50&r2=1.51
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-file.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/misc/lvm-file.c
@ 2005-03-10 22:31 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2005-03-10 22:31 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-03-10 22:31:10
Modified files:
. : WHATS_NEW
lib/misc : lvm-file.c
Log message:
Additional rename failure error message.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.202&r2=1.203
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-file.c.diff?cvsroot=lvm2&r1=1.10&r2=1.11
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/misc/lvm-file.c
@ 2007-07-28 15:20 meyering
0 siblings, 0 replies; 4+ messages in thread
From: meyering @ 2007-07-28 15:20 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: meyering@sourceware.org 2007-07-28 15:20:36
Modified files:
. : WHATS_NEW
lib/misc : lvm-file.c
Log message:
Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.673&r2=1.674
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-file.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23
--- LVM2/WHATS_NEW 2007/07/28 12:26:21 1.673
+++ LVM2/WHATS_NEW 2007/07/28 15:20:36 1.674
@@ -1,5 +1,6 @@
Version 2.02.28 -
================================
+ Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails.
Remove create_dir function; use now-equivalent dm_create_dir instead
Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
Fix clvmd if compiled with gulm support. (2.02.26)
--- LVM2/lib/misc/lvm-file.c 2007/07/28 12:26:21 1.22
+++ LVM2/lib/misc/lvm-file.c 2007/07/28 15:20:36 1.23
@@ -245,6 +245,7 @@
if (fcntl(lockfd, F_SETLKW, &lock)) {
log_sys_error("fcntl", file);
+ close(lockfd);
return -1;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/misc/lvm-file.c
@ 2011-06-08 8:49 prajnoha
0 siblings, 0 replies; 4+ messages in thread
From: prajnoha @ 2011-06-08 8:49 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha@sourceware.org 2011-06-08 08:49:54
Modified files:
. : WHATS_NEW
lib/misc : lvm-file.c
Log message:
Fix create_temp_name to replace any '/' found in the hostname with '?'.
There's a possibility someone will use the '/' in the hostname. Since we
generate a temporary file name (path) including the hostname, any '/' would
be ambiguous.
We can always set such hostname using 'sethostname' from unistd.h. But the
'hostname' command already includes the check and removes the '/' char.
However, some old versions still allow that.
See: https://bugzilla.redhat.com/show_bug.cgi?id=711445.
Since this is only a temporary name and the possibility of this error is
quite negligible, we don't need any complex escape sequence here, just a
simple char replace.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2006&r2=1.2007
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-file.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28
--- LVM2/WHATS_NEW 2011/06/02 09:02:03 1.2006
+++ LVM2/WHATS_NEW 2011/06/08 08:49:53 1.2007
@@ -1,5 +1,6 @@
Version 2.02.86 -
=================================
+ Fix create_temp_name to replace any '/' found in the hostname with '?'.
Always use append to file in lvmdump (selinux policy - no file truncation).
Propagate test mode to clvmd to skip activation and changes to held locks.
Defer writing PV labels to vg_write.
--- LVM2/lib/misc/lvm-file.c 2009/07/15 20:02:47 1.27
+++ LVM2/lib/misc/lvm-file.c 2011/06/08 08:49:54 1.28
@@ -35,6 +35,7 @@
int i, num;
pid_t pid;
char hostname[255];
+ char *p;
struct flock lock = {
.l_type = F_WRLCK,
.l_whence = 0,
@@ -48,6 +49,12 @@
log_sys_error("gethostname", "");
strcpy(hostname, "nohostname");
}
+ else {
+ /* Replace any '/' with '?' found in the hostname. */
+ p = hostname;
+ while ((p = strchr(p, '/')))
+ *p = '?';
+ }
for (i = 0; i < 20; i++, num++) {
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-08 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-19 19:24 LVM2 ./WHATS_NEW lib/misc/lvm-file.c agk
2005-03-10 22:31 agk
2007-07-28 15:20 meyering
2011-06-08 8:49 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).