Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
46c1baa9bc
|
|||
|
600f3b4e23
|
|||
|
dcfb0e715a
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -21,3 +21,4 @@
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*.changes merge=merge-changes
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,6 @@
|
||||
.osc
|
||||
*.obscpio
|
||||
*.osc
|
||||
_build.*
|
||||
.pbuild
|
||||
lua*-luaposix-*-build/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>luajit</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
</multibuild>
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 24 14:49:27 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch off building lua51 build of the package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 13 10:55:30 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Make the package buildable with LuaJIT.
|
||||
- Add setgroups.patch to avoid security issue with not calling
|
||||
setgroups() before setuid() (gh#luaposix/luaposix!388).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 11:52:07 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||
|
||||
|
||||
@@ -31,9 +31,13 @@ License: MIT
|
||||
Group: Development/Libraries/Other
|
||||
URL: https://github.com/luaposix/luaposix
|
||||
Source0: https://github.com/luaposix/luaposix/archive/v%{version}/%{mod_name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM setgroups.patch gh#luaposix/luaposix!388 mcepl@suse.com
|
||||
# use setgroups before setuid
|
||||
Patch0: setgroups.patch
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: %{flavor}-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconf
|
||||
BuildRequires: perl
|
||||
Requires: %{flavor}
|
||||
%lua_provides
|
||||
@@ -51,12 +55,12 @@ BuildArch: noarch
|
||||
This package contains the documentation for %{flavor}-luaposix.
|
||||
|
||||
%prep
|
||||
%autosetup -n luaposix-%{version}
|
||||
%autosetup -p1 -n luaposix-%{version}
|
||||
|
||||
%build
|
||||
# avoid setting USER tag
|
||||
export USER=""
|
||||
build-aux/luke PREFIX=%{_prefix} all
|
||||
build-aux/luke CFLAGS="$(pkgconf --cflags --libs lua)" PREFIX=%{_prefix} all
|
||||
|
||||
%install
|
||||
build-aux/luke PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_archdir} \
|
||||
@@ -69,7 +73,7 @@ build-aux/luke PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_archd
|
||||
%{lua_noarchdir}/posix
|
||||
|
||||
# Only produce docs during one flavor to avoid duplicate binary.
|
||||
%ifluadefault
|
||||
%if "%{lua_version_nodots}" == "%{lua_version_default_nodots}"
|
||||
%files -n %{mod_name}-doc
|
||||
%doc doc/*
|
||||
%endif
|
||||
|
||||
27
setgroups.patch
Normal file
27
setgroups.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
ext/posix/unistd.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: luaposix-35.1/ext/posix/unistd.c
|
||||
===================================================================
|
||||
--- luaposix-35.1.orig/ext/posix/unistd.c 2021-09-10 02:42:44.000000000 +0200
|
||||
+++ luaposix-35.1/ext/posix/unistd.c 2025-10-13 12:57:47.759515415 +0200
|
||||
@@ -1063,10 +1063,18 @@
|
||||
case 'U':
|
||||
return pushresult(L, seteuid(mygetuid(L, 2)), NULL);
|
||||
case 'u':
|
||||
+#if HAVE_SETGROUPS
|
||||
+ if (setgroups(0, NULL) == -1)
|
||||
+ return pusherror(L, "setgroups");
|
||||
+#endif
|
||||
return pushresult(L, setuid(mygetuid(L, 2)), NULL);
|
||||
case 'G':
|
||||
return pushresult(L, setegid(mygetgid(L, 2)), NULL);
|
||||
case 'g':
|
||||
+#if HAVE_SETGROUPS
|
||||
+ if (setgroups(0, NULL) == -1)
|
||||
+ return pusherror(L, "setgroups");
|
||||
+#endif
|
||||
return pushresult(L, setgid(mygetgid(L, 2)), NULL);
|
||||
case 's':
|
||||
return pushresult(L, setsid(), NULL);
|
||||
Reference in New Issue
Block a user