]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
authorDarren Tucker <dtucker@zip.com.au>
Mon, 1 Mar 2010 04:52:49 +0000 (15:52 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Mon, 1 Mar 2010 04:52:49 +0000 (15:52 +1100)
   adjust log at verbose only, since according to cjwatson in bug #1470
   some virtualization platforms don't allow writes.

ChangeLog
openbsd-compat/port-linux.c

index 3ce4347233bcc1c70e09c83404dcd38d3774e17d..1a318e049d21d928cb641a67aa89a4f56b3e95f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 20100301
  - (dtucker) [regress/{cert-hostkey,cfgmatch,cipher-speed}.sh} Replace
    "echo -n" with "echon" for portability.
+ - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
+   adjust log at verbose only, since according to cjwatson in bug #1470
+   some virtualization platforms don't allow writes.
 
 20100228
  - (djm) [auth.c] On Cygwin, refuse usernames that have differences in
index cda751deaa5ea855e1aab3c1d9042871fc301a9c..89b9a734041dc4f4006aa0c2f1796cc4267456b8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: port-linux.c,v 1.7 2009/12/08 02:39:48 dtucker Exp $ */
+/* $Id: port-linux.c,v 1.8 2010/03/01 04:52:50 dtucker Exp $ */
 
 /*
  * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -229,11 +229,11 @@ oom_adjust_setup(void)
        debug3("%s", __func__);
        if ((fp = fopen(OOM_ADJ_PATH, "r+")) != NULL) {
                if (fscanf(fp, "%d", &oom_adj_save) != 1)
-                       logit("error reading %s: %s", OOM_ADJ_PATH, strerror(errno));
+                       verbose("error reading %s: %s", OOM_ADJ_PATH, strerror(errno));
                else {
                        rewind(fp);
                        if (fprintf(fp, "%d\n", OOM_ADJ_NOKILL) <= 0)
-                               logit("error writing %s: %s",
+                               verbose("error writing %s: %s",
                                    OOM_ADJ_PATH, strerror(errno));
                        else
                                verbose("Set %s from %d to %d",
@@ -254,7 +254,7 @@ oom_adjust_restore(void)
                return;
 
        if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
-               logit("error writing %s: %s", OOM_ADJ_PATH, strerror(errno));
+               verbose("error writing %s: %s", OOM_ADJ_PATH, strerror(errno));
        else
                verbose("Set %s to %d", OOM_ADJ_PATH, oom_adj_save);