commit openssh for openSUSE:Factory
Hello community, here is the log from the commit of package openssh for openSUSE:Factory checked in at Thu Nov 18 17:45:04 CET 2010. -------- --- openssh/openssh.changes 2010-11-02 14:29:50.000000000 +0100 +++ openssh/openssh.changes 2010-11-16 15:46:19.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Nov 16 14:45:14 UTC 2010 - cristian.rodriguez@opensuse.org + +- Use upstream oom_adj is deprecated patch + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- openssh-deprecated-oom_adj.patch New: ---- openssh-linux-new-oomkill.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openssh-askpass-gnome.spec ++++++ --- /var/tmp/diff_new_pack.9hlh2b/_old 2010-11-18 17:44:18.000000000 +0100 +++ /var/tmp/diff_new_pack.9hlh2b/_new 2010-11-18 17:44:18.000000000 +0100 @@ -23,7 +23,7 @@ License: BSD3c(or similar) Group: Productivity/Networking/SSH Version: 5.6p1 -Release: 5 +Release: 6 Requires: openssh = %{version} openssh-askpass = %{version} AutoReqProv: on Summary: A GNOME-Based Passphrase Dialog for OpenSSH ++++++ openssh.spec ++++++ --- /var/tmp/diff_new_pack.9hlh2b/_old 2010-11-18 17:44:18.000000000 +0100 +++ /var/tmp/diff_new_pack.9hlh2b/_new 2010-11-18 17:44:18.000000000 +0100 @@ -30,7 +30,7 @@ Conflicts: nonfreessh AutoReqProv: on Version: 5.6p1 -Release: 5 +Release: 6 %define xversion 1.2.4.1 Summary: Secure Shell Client and Server (Remote Login Program) Url: http://www.openssh.com/ @@ -63,7 +63,7 @@ Patch17: %{name}-%{version}-homechroot.patch Patch18: %{name}-%{version}-sshconfig-knownhostschanges.diff Patch19: %{name}-%{version}-host_ident.diff -Patch20: openssh-deprecated-oom_adj.patch +Patch20: openssh-linux-new-oomkill.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package askpass ++++++ openssh-linux-new-oomkill.patch ++++++ Index: openbsd-compat/port-linux.c =================================================================== RCS file: /home/dtucker/openssh/cvs/openssh/openbsd-compat/port-linux.c,v retrieving revision 1.9 diff -u -p -r1.9 port-linux.c --- openbsd-compat/port-linux.c 10 Sep 2010 00:30:25 -0000 1.9 +++ openbsd-compat/port-linux.c 16 Nov 2010 05:10:13 -0000 @@ -208,14 +208,21 @@ ssh_selinux_change_context(const char *n #endif /* WITH_SELINUX */ #ifdef LINUX_OOM_ADJUST -#define OOM_ADJ_PATH "/proc/self/oom_adj" /* - * The magic "don't kill me", as documented in eg: + * The magic "don't kill me" values, old and new, as documented in eg: * http://lxr.linux.no/#linux+v2.6.32/Documentation/filesystems/proc.txt + * http://lxr.linux.no/#linux+v2.6.36/Documentation/filesystems/proc.txt */ -#define OOM_ADJ_NOKILL -17 static int oom_adj_save = INT_MIN; +static char *oom_adj_path = NULL; +struct { + char *path; + int value; +} oom_adjust[] = { + {"/proc/self/oom_score_adj", -1000}, /* new values, 2.6.36 and up */ + {"/proc/self/oom_adj", -17}, /* old values, 2.6.35 and down */ +}; /* * Tell the kernel's out-of-memory killer to avoid sshd. @@ -224,23 +231,31 @@ static int oom_adj_save = INT_MIN; void oom_adjust_setup(void) { + int i, value; FILE *fp; debug3("%s", __func__); - if ((fp = fopen(OOM_ADJ_PATH, "r+")) != NULL) { - if (fscanf(fp, "%d", &oom_adj_save) != 1) - verbose("error reading %s: %s", OOM_ADJ_PATH, strerror(errno)); - else { - rewind(fp); - if (fprintf(fp, "%d\n", OOM_ADJ_NOKILL) <= 0) - verbose("error writing %s: %s", - OOM_ADJ_PATH, strerror(errno)); - else - verbose("Set %s from %d to %d", - OOM_ADJ_PATH, oom_adj_save, OOM_ADJ_NOKILL); + for (i = 0; i < 2; i++) { + oom_adj_path = oom_adjust[i].path; + value = oom_adjust[i].value; + if ((fp = fopen(oom_adj_path, "r+")) != NULL) { + if (fscanf(fp, "%d", &oom_adj_save) != 1) + verbose("error reading %s: %s", oom_adj_path, + strerror(errno)); + else { + rewind(fp); + if (fprintf(fp, "%d\n", value) <= 0) + verbose("error writing %s: %s", + oom_adj_path, strerror(errno)); + else + verbose("Set %s from %d to %d", + oom_adj_path, oom_adj_save, value); + } + fclose(fp); + return; } - fclose(fp); } + oom_adj_path = NULL; } /* Restore the saved OOM adjustment */ @@ -250,13 +265,14 @@ oom_adjust_restore(void) FILE *fp; debug3("%s", __func__); - if (oom_adj_save == INT_MIN || (fp = fopen(OOM_ADJ_PATH, "w")) == NULL) + if (oom_adj_save == INT_MIN || oom_adj_save == NULL || + (fp = fopen(oom_adj_path, "w")) == NULL) return; if (fprintf(fp, "%d\n", oom_adj_save) <= 0) - verbose("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); + verbose("Set %s to %d", oom_adj_path, oom_adj_save); fclose(fp); return; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de