Reset poky to before our libpam hacks

Things got a bit out of synch with openbmc-config due to the libpam
issues and the migration from the meta-* layers.

Revert the two previous commits and then put the latest poky in with the
libpam revert and get openbmc-config right again.

Revert "Revert "libpam: update 1.3.1 -> 1.5.1""

This reverts commit 87ddd3eab4df68e624b5350ccaab28b3b97547c0.

Revert "poky: subtree update:796be0593a..10c69538c0"

This reverts commit c723b72979bfac6362509cf1fe086900f6641f28.

Change-Id: I3a1f405193aee6a21fe0cd24be9927c143a23d9a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
new file mode 100644
index 0000000..c5960a0
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
@@ -0,0 +1,162 @@
+From ef9580ea1e2f1e57af3c7dcb0ec392ba8dbb5c8d Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Tue, 10 Mar 2020 11:05:20 +0000
+Subject: [PATCH] Handle missing gshadow
+
+gshadow usage is now present in the userdb code. Mask all uses of it to
+allow compilation on musl
+
+Upstream-Status: Inappropriate [musl specific]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ src/shared/group-record-nss.c | 20 ++++++++++++++++++++
+ src/shared/group-record-nss.h |  4 ++++
+ src/shared/userdb.c           |  6 ++++++
+ 3 files changed, 30 insertions(+)
+
+--- a/src/shared/group-record-nss.c
++++ b/src/shared/group-record-nss.c
+@@ -19,8 +19,10 @@ int nss_group_to_group_record(
+         if (isempty(grp->gr_name))
+                 return -EINVAL;
+ 
++#if ENABLE_GSHADOW
+         if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name))
+                 return -EINVAL;
++#endif
+ 
+         g = group_record_new();
+         if (!g)
+@@ -36,6 +38,7 @@ int nss_group_to_group_record(
+ 
+         g->gid = grp->gr_gid;
+ 
++#if ENABLE_GSHADOW
+         if (sgrp) {
+                 if (looks_like_hashed_password(sgrp->sg_passwd)) {
+                         g->hashed_password = strv_new(sgrp->sg_passwd);
+@@ -51,6 +54,7 @@ int nss_group_to_group_record(
+                 if (!g->administrators)
+                         return -ENOMEM;
+         }
++#endif
+ 
+         r = json_build(&g->json, JSON_BUILD_OBJECT(
+                                        JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
+@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct grou
+         assert(ret_sgrp);
+         assert(ret_buffer);
+ 
++#if ENABLE_GSHADOW
+         for (;;) {
+                 _cleanup_free_ char *buf = NULL;
+                 struct sgrp sgrp, *result;
+@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct grou
+                 buflen *= 2;
+                 buf = mfree(buf);
+         }
++#else
++        return -ESRCH;
++#endif
+ }
+ 
+ int nss_group_record_by_name(
+@@ -115,7 +123,9 @@ int nss_group_record_by_name(
+         struct group grp, *result;
+         bool incomplete = false;
+         size_t buflen = 4096;
++#if ENABLE_GSHADOW
+         struct sgrp sgrp, *sresult = NULL;
++#endif
+         int r;
+ 
+         assert(name);
+@@ -145,6 +155,7 @@ int nss_group_record_by_name(
+                 buf = mfree(buf);
+         }
+ 
++#if ENABLE_GSHADOW
+         if (with_shadow) {
+                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
+                 if (r < 0) {
+@@ -156,6 +167,9 @@ int nss_group_record_by_name(
+                 incomplete = true;
+ 
+         r = nss_group_to_group_record(result, sresult, ret);
++#else
++        r = nss_group_to_group_record(result, NULL, ret);
++#endif
+         if (r < 0)
+                 return r;
+ 
+@@ -172,7 +186,9 @@ int nss_group_record_by_gid(
+         struct group grp, *result;
+         bool incomplete = false;
+         size_t buflen = 4096;
++#if ENABLE_GSHADOW
+         struct sgrp sgrp, *sresult = NULL;
++#endif
+         int r;
+ 
+         assert(ret);
+@@ -200,6 +216,7 @@ int nss_group_record_by_gid(
+                 buf = mfree(buf);
+         }
+ 
++#if ENABLE_GSHADOW
+         if (with_shadow) {
+                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
+                 if (r < 0) {
+@@ -211,6 +228,9 @@ int nss_group_record_by_gid(
+                 incomplete = true;
+ 
+         r = nss_group_to_group_record(result, sresult, ret);
++#else
++        r = nss_group_to_group_record(result, NULL, ret);
++#endif
+         if (r < 0)
+                 return r;
+ 
+--- a/src/shared/group-record-nss.h
++++ b/src/shared/group-record-nss.h
+@@ -2,7 +2,11 @@
+ #pragma once
+ 
+ #include <grp.h>
++#if ENABLE_GSHADOW
+ #include <gshadow.h>
++#else
++struct sgrp;
++#endif
+ 
+ #include "group-record.h"
+ 
+--- a/src/shared/userdb.c
++++ b/src/shared/userdb.c
+@@ -930,13 +930,16 @@ int groupdb_iterator_get(UserDBIterator
+                 if (gr) {
+                         _cleanup_free_ char *buffer = NULL;
+                         bool incomplete = false;
++#if ENABLE_GSHADOW
+                         struct sgrp sgrp;
++#endif
+ 
+                         if (streq_ptr(gr->gr_name, "root"))
+                                 iterator->synthesize_root = false;
+                         if (gr->gr_gid == GID_NOBODY)
+                                 iterator->synthesize_nobody = false;
+ 
++#if ENABLE_GSHADOW
+                         r = nss_sgrp_for_group(gr, &sgrp, &buffer);
+                         if (r < 0) {
+                                 log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name);
+@@ -944,6 +947,9 @@ int groupdb_iterator_get(UserDBIterator
+                         }
+ 
+                         r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
++#else
++                        r = nss_group_to_group_record(gr, NULL, ret);
++#endif
+                         if (r < 0)
+                                 return r;
+