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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b346c8649eca47cc8ed7846d4f6d74d8@SN2PR03MB061.namprd03.prod.outlook.com>
Date:	Fri, 22 Mar 2013 18:50:17 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Olaf Hering <olaf@...fle.de>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"apw@...onical.com" <apw@...onical.com>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	Evgeniy Polyakov <zbr@...emap.net>
Subject: RE: [PATCH V2 1/1] Drivers: hv: Add a new driver to support host
 initiated backup



> -----Original Message-----
> From: Olaf Hering [mailto:olaf@...fle.de]
> Sent: Friday, March 22, 2013 12:15 PM
> To: KY Srinivasan
> Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; apw@...onical.com; jasowang@...hat.com;
> Evgeniy Polyakov
> Subject: Re: [PATCH V2 1/1] Drivers: hv: Add a new driver to support host
> initiated backup
> 
> On Fri, Mar 15, K. Y. Srinivasan wrote:
> 
> > This driver has a user-level component (daemon) that invokes the appropriate
> 
> This change fixes a few compile errors:
> 
> hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
> hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
> hv_vss_daemon.c: In function 'vss_operate':
> hv_vss_daemon.c:66: warning: 'return' with no value, in function returning non-
> void
> hv_vss_daemon.c: In function 'main':
> hv_vss_daemon.c:130: warning: ignoring return value of 'daemon', declared with
> attribute warn_unused_result
> hv_vss_daemon.c: In function 'vss_operate':
> hv_vss_daemon.c:47: warning: 'fs_op' may be used uninitialized in this function
> 
> Signed-off-by: Olaf Hering <olaf@...fle.de>

Acked-by:  K. Y. Srinivasan <kys@...rosoft.com>


> 
> --- a/tools/hv/hv_vss_daemon.c	2013-03-22 17:06:41.000000000 +0100
> +++ b/tools/hv/hv_vss_daemon.c	2013-03-22 17:09:41.000000000 +0100
> @@ -51,7 +51,7 @@ static int vss_operate(int operation)
>  	FILE *file;
>  	char *p;
>  	char *x;
> -	int error;
> +	int error = -1;
> 
>  	switch (operation) {
>  	case VSS_OP_FREEZE:
> @@ -60,11 +60,13 @@ static int vss_operate(int operation)
>  	case VSS_OP_THAW:
>  		fs_op = "-u ";
>  		break;
> +	default:
> +		goto out;
>  	}
> 
> -	file = popen("mount | awk '/^\/dev\// { print $3}'", "r");
> +	file = popen("mount | awk '/^\\/dev\\// { print $3}'", "r");
>  	if (file == NULL)
> -		return;
> +		goto out;
> 
>  	while ((p = fgets(buf, sizeof(buf), file)) != NULL) {
>  		x = strchr(p, '\n');
> @@ -82,6 +84,7 @@ static int vss_operate(int operation)
>  	syslog(LOG_INFO, "VSS cmd is %s\n", cmd);
>  	error = system(cmd);
> 
> +out:
>  	return error;
>  }
> 
> @@ -128,7 +131,9 @@ int main(void)
>  	int	op;
>  	struct hv_vss_msg *vss_msg;
> 
> -	daemon(1, 0);
> +	if (daemon(1, 0))
> +		return 1;
> +
>  	openlog("Hyper-V VSS", 0, LOG_USER);
>  	syslog(LOG_INFO, "VSS starting; pid is:%d", getpid());
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ