Re: [Openvpn-devel] [PATCH] Fixed compiler warnings reported on Ubuntu 10.04

2010-09-17 Thread Peter Stuge
David Sommerseth wrote:
> The warnings reported where:
> 
> misc.c:158: warning: ignoring return value of ‘nice’, declared with attribute 
> warn_unused_result
> options.c:4033: warning: format not a string literal and no format arguments
> options.c:4043: warning: format not a string literal and no format arguments
> options.c:4053: warning: format not a string literal and no format arguments
> push.c:182: warning: format not a string literal and no format arguments
> push.c:199: warning: format not a string literal and no format arguments
> push.c:235: warning: format not a string literal and no format arguments
> status.c:171: warning: ignoring return value of ‘ftruncate’, declared with 
> attribute warn_unused_result
> 
> 
> Signed-off-by: David Sommerseth 

Acked-by: Peter Stuge 



Re: [Openvpn-devel] [PATCH] Fixed compiler warnings reported on Ubuntu 10.04

2010-09-17 Thread Gert Doering
Hi,

On Fri, Sep 17, 2010 at 05:18:55PM +0200, David Sommerseth wrote:
> diff --git a/misc.c b/misc.c
> index eafd892..1e863f2 100644

ACK.  Good programming practice.

The format string stuff might be harmless right now (if the input is
well-controlled) but might it's still good practice to be explicit
about it "this is a string, no more".

gert
-- 
USENET is *not* the non-clickable part of WWW!
   //www.muc.de/~gert/
Gert Doering - Munich, Germany g...@greenie.muc.de
fax: +49-89-35655025g...@net.informatik.tu-muenchen.de


pgpZer4exDvXT.pgp
Description: PGP signature


[Openvpn-devel] [PATCH] Fixed compiler warnings reported on Ubuntu 10.04

2010-09-17 Thread David Sommerseth
The warnings reported where:

misc.c:158: warning: ignoring return value of ‘nice’, declared with attribute 
warn_unused_result
options.c:4033: warning: format not a string literal and no format arguments
options.c:4043: warning: format not a string literal and no format arguments
options.c:4053: warning: format not a string literal and no format arguments
push.c:182: warning: format not a string literal and no format arguments
push.c:199: warning: format not a string literal and no format arguments
push.c:235: warning: format not a string literal and no format arguments
status.c:171: warning: ignoring return value of ‘ftruncate’, declared with 
attribute warn_unused_result


Signed-off-by: David Sommerseth 
---
 misc.c|5 ++---
 options.c |6 +++---
 push.c|6 +++---
 status.c  |4 +++-
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/misc.c b/misc.c
index eafd892..1e863f2 100644
--- a/misc.c
+++ b/misc.c
@@ -155,9 +155,8 @@ set_nice (int niceval)
 {
 #ifdef HAVE_NICE
   errno = 0;
-  nice (niceval);
-  if (errno != 0)
-   msg (M_WARN | M_ERRNO, "WARNING: nice %d failed", niceval);
+  if (nice (niceval) < 0 && errno != 0)
+   msg (M_WARN | M_ERRNO, "WARNING: nice %d failed: %s", niceval, 
strerror(errno));
   else
msg (M_INFO, "nice %d succeeded", niceval);
 #else
diff --git a/options.c b/options.c
index d40c7f0..3d0c5e3 100644
--- a/options.c
+++ b/options.c
@@ -4030,7 +4030,7 @@ add_option (struct options *options,
{
  if (options->inetd != -1)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
  goto err;
}
  else
@@ -4040,7 +4040,7 @@ add_option (struct options *options,
{
  if (options->inetd != -1)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
  goto err;
}
  else
@@ -4050,7 +4050,7 @@ add_option (struct options *options,
{
  if (name != NULL)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
  goto err;
}
  name = p[z];
diff --git a/push.c b/push.c
index 1320bec..40e64c3 100644
--- a/push.c
+++ b/push.c
@@ -179,7 +179,7 @@ send_push_reply (struct context *c)
   const int safe_cap = BCAP () - extra;
   bool push_sent = false;

-  buf_printf (, cmd);
+  buf_printf (, "%s", cmd);

   while (e)
 {
@@ -196,7 +196,7 @@ send_push_reply (struct context *c)
push_sent = true;
multi_push = true;
buf_reset_len ();
-   buf_printf (, cmd);
+   buf_printf (, "%s", cmd);
  }
}
  if (BLEN () + l >= safe_cap)
@@ -232,7 +232,7 @@ send_push_reply (struct context *c)
   bool status = false;

   buf_reset_len ();
-  buf_printf (, cmd);
+  buf_printf (, "%s", cmd);
   status = send_control_channel_string (c, BSTR(), D_PUSH);
   if (!status)
goto fail;
diff --git a/status.c b/status.c
index 92fc7bc..dd6fe1e 100644
--- a/status.c
+++ b/status.c
@@ -168,7 +168,9 @@ status_flush (struct status_output *so)
 #if defined(HAVE_FTRUNCATE)
   {
const off_t off = lseek (so->fd, (off_t)0, SEEK_CUR);
-   ftruncate (so->fd, off);
+   if (ftruncate (so->fd, off) != 0) {
+ msg (M_WARN, "Failed to truncate status file: %s", strerror(errno));
+   }
   }
 #elif defined(HAVE_CHSIZE)
   {
-- 
1.7.2.3




[Openvpn-devel] Summary of the IRC meeting (16th Sep 2010)

2010-09-17 Thread Samuli Seppänen
Hi,

Here's the summary of the previous community meeting.

---

COMMUNITY MEETING

Place: #openvpn-devel on irc.freenode.net
List-Post: openvpn-devel@lists.sourceforge.net
Date: Thursday, 16th Sep 2010
Time: 18:00 UTC

Planned meeting topics for this meeting were on this page:



Next meeting next week, same place, same time. Your local meeting time
is easy to check from services such as



or with

$ date -u


SUMMARY


Discussed the "Windows route + hibernate/suspend issue":



D303k and jamesyonan debugged this issue during the meeting and got
mixed results on Windows 7 VM running on VMWare ESX: sometimes OpenVPN
recovered properly, sometimes not. Mattock promised to ask the original
bug reported for log files with "verb 7" log level. D303k promised to
try reproducing this problem on real, hardware Win7 laptop.

This issue seems to be Windows-related, as similar problems have not
been reported for *NIX platforms. Also, mattock and frk are constantly
using OpenVPN with hibernation on Ubuntu 9.10 / 10.04 / 10.10 without
any issues.

--

Discussed the use of a relatively powerful Xen DomU (VM) which was
offered to the project. Potential uses for this server were discussed in
this meeting two weeks ago.

Decided to use VM as the public test server (for "make test") and as a
buildslave. FreeBSD was chosen as the OS, other alternatives being
Debian, Ubuntu, CentOS and Win2008k. The reason was that we already have
buildslaves for the other OSes (except Win2008k) and in test server use
the OS does not really matter.

--

Mattock gave an update on recently released 2.2-beta3. Looking at the
webserver logs 2.2-beta3 there have been total of 6842 downloads from
unique IPs. Out of these 6593 were windows installers. As 2.2-beta3 has
without a doubt been downloaded from computers behind NAT firewalls, the
real download figure is probably between 7000 and 1.

--

Mattock gave an update on Buildbot and Debian packages. Yesterday he got
four buildslaves (debian-5-i386/amd64 and ubuntu-10.04-i386/amd64)
connected to the buildmaster server through the community VPN. These
buildslaves will then build packages for their respective
OS/architecture. Building the Debian packages under buildbot has been
tested already, but the debian control files need some work, as does
buildmaster configuration.

If all goes well, first Debian packages based on "allmerged" branch
should be available in the evening of 17th September.

--

Discussed the possibility of hosting future OpenVPN (open source) file
releases on SF.net instead of openvpn.net servers. The main download
page with download links, release notes etc. would still be at openvpn.net:



This would give a few benefits:

* More visibility for the OpenVPN project through higher ratings at SF.net
* Free mirroring and bandwidth
* Very detailed download statistics

The only downside is the potential reduction of traffic going through
openvpn.net.

An alternate approach would be to host releases primarily on openvpn.net
servers, but offer them through SF.net also as a secondary option.

Mattock promised to look into this issue.

---

Full chatlog as an attachment

-- 
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

(21:01:41) jamesyonan [~jamesy...@c-76-120-71-74.hsd1.co.comcast.net] è 
entrato nel canale.
(21:01:55) mattock: hi james!
(21:02:20) modalità (+o jamesyonan) da ChanServ
(21:02:20) jamesyonan: Hi
(21:02:20) fkr: hey james.
(21:02:34) fkr: <- the guy who maintains openvpn on openbsd (among other things)
(21:02:49) mattock: dazo: did you find any stuff worth discussing?
(21:03:08) mattock: perhaps the thread Alon started...
(21:04:28) dazo: mattock: No, I haven't managed all I wanted ... but it's been 
a lot of interesting discussions on the ML lately
(21:04:32) ecrist: raidz: I'm thinking that the best thing to do would be to 
put up a webser that can respond with something as simple as 'Service 
Unavailable'
(21:04:42) ecrist: not worth the effort to replicate the db
(21:04:53) ecrist: if it's going to be long-term, we can restore the db from 
backups
(21:05:14) mattock: ok, time to start meeting...
(21:05:17) ecrist: if the forum gets 'really' active, we can even start doing 
backups more frequently than once a day.
(21:05:19) raidz: ecrist: no problem, that works
(21:05:24) ***ecrist shuts up
(21:05:46) mattock: ok, so topic list is short and here: 
https://community.openvpn.net/openvpn/wiki/Topics-2010-09-16
(21:05:48) vpnHelper: Title: Topics-2010-09-16 – OpenVPN Community (at 
community.openvpn.net)
(21:06:21) mattock: I dug into the Windows route + hibernate/suspend issue 
today: https://community.openvpn.net/openvpn/ticket/56
(21:06:24) vpnHelper: Title: #56 (WinXP: route setup broken after standby) – 
OpenVPN