sysutils/pam_xdg: update to s20210801
Changes: https://git.sdaoden.eu/browse?p=s-toolbox.git;a=commitdiff;h=43445d6d87d9
This commit is contained in:
parent
39439f4f1d
commit
8691cddccd
@ -1,5 +1,5 @@
|
||||
PORTNAME= pam_xdg
|
||||
PORTVERSION= s20210704
|
||||
PORTVERSION= s20210801
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
@ -11,7 +11,7 @@ USES= uidfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= jbeich # mirror
|
||||
GH_PROJECT= s-toolbox
|
||||
GH_TAGNAME= 6f22586
|
||||
GH_TAGNAME= 43445d6
|
||||
PLIST_FILES= lib/${PORTNAME}.so \
|
||||
share/man/man8/${PORTNAME}.8.gz
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1625354859
|
||||
SHA256 (jbeich-s-toolbox-s20210704-6f22586_GH0.tar.gz) = 18cba3878b9fb8f6afed578cd69d1c9bb9425ba1248ae5ce919db3f4fecca007
|
||||
SIZE (jbeich-s-toolbox-s20210704-6f22586_GH0.tar.gz) = 98443
|
||||
TIMESTAMP = 1627771376
|
||||
SHA256 (jbeich-s-toolbox-s20210801-43445d6_GH0.tar.gz) = fcaca0beed7fc1d22267eba3e65f5f36d711b70fa96e4a8e4bcb6194dd07bbe6
|
||||
SIZE (jbeich-s-toolbox-s20210801-43445d6_GH0.tar.gz) = 100159
|
||||
|
@ -1,32 +0,0 @@
|
||||
- Chase option name used in the source
|
||||
- Switch to OpenPAM include for local sessions
|
||||
|
||||
--- pam_xdg.8.orig 2021-03-29 22:50:34 UTC
|
||||
+++ pam_xdg.8
|
||||
@@ -28,7 +28,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.
|
||||
.Nm
|
||||
-.Op Ar rundir
|
||||
+.Op Ar runtime
|
||||
.Op Ar notroot
|
||||
.
|
||||
.
|
||||
@@ -47,7 +47,7 @@ into user sessions.
|
||||
When linked into the PAM session system the runtime directory will be
|
||||
created once a user creates his or her first login session.
|
||||
Unless
|
||||
-.Ar rundir
|
||||
+.Ar runtime
|
||||
was given all XDG related environment variables will be created in all
|
||||
user sessions with their default or computed values, otherwise only
|
||||
.Ev XDG_RUNTIME_DIR .
|
||||
@@ -61,7 +61,7 @@ In order to make use of this script, place the followi
|
||||
file of desire under
|
||||
.Pa /etc/pam.d ,
|
||||
best maybe
|
||||
-.Pa /etc/pam.d/common-session
|
||||
+.Pa /etc/pam.d/system
|
||||
if that exists (possibly adjusting paths):
|
||||
.
|
||||
.Bd -literal -offset indent
|
@ -1,44 +0,0 @@
|
||||
- Prefer system PATH_MAX
|
||||
- Add OpenPAM support
|
||||
- Relax O_PATH optimization
|
||||
|
||||
--- pam_xdg.c.orig 2021-03-29 22:50:34 UTC
|
||||
+++ pam_xdg.c
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> /* PATH_MAX */
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -60,11 +61,29 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <security/pam_modules.h>
|
||||
+#if __has_include(<security/pam_ext.h>)
|
||||
#include <security/pam_ext.h>
|
||||
+#else
|
||||
+#include <security/pam_appl.h>
|
||||
+/* From freebsd-src/sys/contrib/openzfs/contrib/pam_zfs_key/pam_zfs_key.c */
|
||||
+static void
|
||||
+pam_syslog(pam_handle_t *pamh __unused, int loglevel, const char *fmt, ...)
|
||||
+{
|
||||
+ va_list args;
|
||||
+ va_start(args, fmt);
|
||||
+ vsyslog(loglevel, fmt, args);
|
||||
+ va_end(args);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/* _XOPEN_PATH_MAX POSIX 2008/Cor 1-2013 */
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
+#endif
|
||||
+
|
||||
+/* Linux extension adopted by FreeBSD 13.1 */
|
||||
+#ifndef O_PATH
|
||||
+# define O_PATH 0
|
||||
#endif
|
||||
|
||||
static int a_xdg(int isopen, pam_handle_t *pamh, int flags, int argc,
|
@ -1,5 +1,4 @@
|
||||
Complete XDG Base Directories support via PAM, including injection of
|
||||
according environment variables into user sessions, as well as creation
|
||||
support for per-user $XDG_RUNTIME_DIR.
|
||||
XDG Base Directories support via PAM: creation of $XDG_RUNTIME_DIRs,
|
||||
injection of environment variables into sessions.
|
||||
|
||||
WWW: https://www.sdaoden.eu/code.html#s-toolbox
|
||||
|
Loading…
Reference in New Issue
Block a user