lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DC7803B42427924284F2D5252E076A3B44728D11@SINEX14MBXC404.southpacific.corp.microsoft.com>
Date:	Thu, 26 Jun 2014 20:58:39 +0000
From:	"Yue Zhang (OSTC DEV)" <yuezha@...rosoft.com>
To:	KY Srinivasan <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	"apw@...onical.com" <apw@...onical.com>
CC:	Dexuan Cui <decui@...rosoft.com>,
	Thomas Shao <huishao@...rosoft.com>
Subject: RE: [PATCH] Tools: hv: fix file overwriting of hv_fcopy_daemon



> -----Original Message-----
> From: KY Srinivasan
> > -----Original Message-----
> > From: Yue Zhang [mailto:yuezha@...rosoft.com]
> > hv_fcopy_daemon fails to overwrite a file if the target file already exits.
> >
> > Add O_TRUNC flag on opening.
> >
> > Signed-off-by: Yue Zhang <yuezha@...rosoft.com>
> > ---
> >  tools/hv/hv_fcopy_daemon.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
> > index fba1c75..01eee6b 100644
> > --- a/tools/hv/hv_fcopy_daemon.c
> > +++ b/tools/hv/hv_fcopy_daemon.c
> > @@ -88,7 +88,8 @@ static int hv_start_fcopy(struct hv_start_fcopy
> > *smsg)  }  }
> >
> > -target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744);
> > +target_fd = open(target_fname,
> > +O_RDWR | O_CREAT | O_TRUNC |
> Please align O_RDWR to align with the first argument (target_fname).
Thanks. I will fix it. 
> 
> K. Y
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ