mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
ports: shadow
This commit is contained in:
@@ -0,0 +1,69 @@
|
|||||||
|
diff --git shadow-clean/lib/freezero.c shadow-workdir/lib/freezero.c
|
||||||
|
index c565f43..a6adf98 100644
|
||||||
|
--- shadow-clean/lib/freezero.c
|
||||||
|
+++ shadow-workdir/lib/freezero.c
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
+#include <memzero.h>
|
||||||
|
|
||||||
|
void
|
||||||
|
freezero(void *ptr, size_t sz)
|
||||||
|
@@ -25,6 +26,6 @@ freezero(void *ptr, size_t sz)
|
||||||
|
if (ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- explicit_bzero(ptr, sz);
|
||||||
|
+ memzero(ptr, sz);
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
diff --git shadow-clean/lib/memzero.h shadow-workdir/lib/memzero.h
|
||||||
|
index 1137e83..bbdcb95 100644
|
||||||
|
--- shadow-clean/lib/memzero.h
|
||||||
|
+++ shadow-workdir/lib/memzero.h
|
||||||
|
@@ -28,14 +28,14 @@ inline void strzero(char *s);
|
||||||
|
inline void
|
||||||
|
memzero(void *ptr, size_t size)
|
||||||
|
{
|
||||||
|
-#if defined(HAVE_MEMSET_EXPLICIT)
|
||||||
|
- memset_explicit(ptr, 0, size);
|
||||||
|
-#elif defined(HAVE_EXPLICIT_BZERO)
|
||||||
|
- explicit_bzero(ptr, size);
|
||||||
|
-#else
|
||||||
|
+//#if defined(HAVE_MEMSET_EXPLICIT)
|
||||||
|
+// memset_explicit(ptr, 0, size);
|
||||||
|
+//#elif defined(HAVE_EXPLICIT_BZERO)
|
||||||
|
+// explicit_bzero(ptr, size);
|
||||||
|
+//#else
|
||||||
|
bzero(ptr, size);
|
||||||
|
__asm__ __volatile__ ("" : : "r"(ptr) : "memory");
|
||||||
|
-#endif
|
||||||
|
+//#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff --git shadow-clean/lib/user_busy.c shadow-workdir/lib/user_busy.c
|
||||||
|
index a622376..f0ef2a4 100644
|
||||||
|
--- shadow-clean/lib/user_busy.c
|
||||||
|
+++ shadow-workdir/lib/user_busy.c
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#endif /* ENABLE_SUBIDS */
|
||||||
|
#include "shadowlog.h"
|
||||||
|
#include "string/sprintf.h"
|
||||||
|
+#include <utmpx.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
diff --git shadow-clean/lib/utmp.c shadow-workdir/lib/utmp.c
|
||||||
|
index 08e9b62..55167c1 100644
|
||||||
|
--- shadow-clean/lib/utmp.c
|
||||||
|
+++ shadow-workdir/lib/utmp.c
|
||||||
|
@@ -21,6 +21,7 @@
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
+#include <netinet/in.h>
|
||||||
|
|
||||||
|
#include "alloc.h"
|
||||||
|
#include "sizeof.h"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name=shadow
|
||||||
|
revision=1
|
||||||
|
from_source=shadow
|
||||||
|
imagedeps="base-devel"
|
||||||
|
hostdeps="xgcc xbinutils"
|
||||||
|
deps="mlibc libxcrypt"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cp -rvfp ${source_dir}/* .
|
||||||
|
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
|
||||||
|
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
|
||||||
|
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
|
||||||
|
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
|
||||||
|
sed -i 's/1000/999/' src/useradd.c
|
||||||
|
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' -e 's:/var/spool/mail:/var/mail:' -i etc/login.defs
|
||||||
|
./configure --host=x86_64-astral --prefix=${prefix} --sysconfdir=/etc --with-group-name-max-length=32 --without-libbsd
|
||||||
|
make -j ${parallelism}
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
make install DESTDIR=${dest_dir}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
name=shadow
|
||||||
|
version=4.15.1
|
||||||
|
source_method=tarball
|
||||||
|
tarball_url="https://github.com/shadow-maint/shadow/releases/download/${version}/shadow-${version}.tar.xz"
|
||||||
|
tarball_sha512="e3ae51bf53bfa1662d81bbe0150ada19c116514f1e56391d877045d48e16776326446561759edbf5006c0f97ab1d5f4bae63521bf1fae67e118ddda0d4a8f6cb"
|
||||||
|
hostdeps="autoconf automake pkgconfig libtool"
|
||||||
|
regenerate() {
|
||||||
|
autoreconf -fvi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user