void-packages/srcpkgs/u9fs/patches/musl-no-rhosts-auth.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

19 lines
460 B
Diff

--- a/authrhosts.c 2016-10-10 13:51:34.924228986 +0200
+++ b/authrhosts.c 2016-10-10 13:51:37.359228942 +0200
@@ -24,11 +24,16 @@
{
USED(tx);
+#ifdef __GLIBC__
if(ruserok(remotehostname, 0, rx->uname, rx->uname) < 0){
fprint(2, "ruserok(%s, %s) not okay\n", remotehostname, rx->uname);
return "u9fs: rhosts authentication failed";
}
return 0;
+#else
+ USED(rx);
+ return "u9fs: rhosts authentication failed";
+#endif
}
Auth authrhosts = {