[arch-commits] Commit in webfs/repos (5 files)
Date: Tuesday, July 7, 2020 @ 15:29:57 Author: felixonmars Revision: 658924 archrelease: copy trunk to community-staging-x86_64 Added: webfs/repos/community-staging-x86_64/ webfs/repos/community-staging-x86_64/PKGBUILD (from rev 658922, webfs/trunk/PKGBUILD) webfs/repos/community-staging-x86_64/webfs.patch (from rev 658922, webfs/trunk/webfs.patch) webfs/repos/community-staging-x86_64/webfsd.conf (from rev 658923, webfs/trunk/webfsd.conf) webfs/repos/community-staging-x86_64/webfsd.service (from rev 658923, webfs/trunk/webfsd.service) + PKGBUILD | 38 webfs.patch| 250 +++ webfsd.conf|5 + webfsd.service | 11 ++ 4 files changed, 304 insertions(+) Copied: webfs/repos/community-staging-x86_64/PKGBUILD (from rev 658922, webfs/trunk/PKGBUILD) === --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-07-07 15:29:57 UTC (rev 658924) @@ -0,0 +1,38 @@ +# Maintainer: Kyle Keen +# Contributor: Roman Kyrylych +# Contributor: Mark Rosenstand +# Contributor: Daniel J Griffiths +# Contributor: Chris Brannon + +pkgname=webfs +pkgver=1.21 +pkgrel=15 +pkgdesc="Simple and instant http server for mostly static content." +arch=(x86_64) +url="http://linux.bytesex.org/misc/webfs.html; +license=("GPL") +depends=('mime-types' 'openssl') +backup=('etc/conf.d/webfsd') +source=(https://dl.bytesex.org/releases/webfs/webfs-${pkgver}.tar.gz +webfsd.conf +webfs.patch +webfsd.service) +md5sums=('6dc125fe160479404147e7bbfc781dbc' + 'b2c1ab041a82acd8391b06dc38d986be' + '7294edcec2589df04bb775270d56536e' + 'e1202dd915cba1a02e0016aa3a516b4a') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + patch -i "$srcdir/webfs.patch" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make prefix=/usr DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/webfsd.conf" "$pkgdir/etc/conf.d/webfsd" + install -Dm644 "$srcdir/webfsd.service" "$pkgdir/usr/lib/systemd/system/webfsd.service" +} Copied: webfs/repos/community-staging-x86_64/webfs.patch (from rev 658922, webfs/trunk/webfs.patch) === --- community-staging-x86_64/webfs.patch(rev 0) +++ community-staging-x86_64/webfs.patch2020-07-07 15:29:57 UTC (rev 658924) @@ -0,0 +1,250 @@ +# This patch performs the following: +# +# 1) user/group names my now be set to the system maximum using +#sysconf(_SC_LOGIN_NAME_MAX). They were previously hardcoded to 16 chars. +# +# 2) supplementary groups are now set according to the user webfs is running as. +#previously they were left as the calling user, which could be dangerous +#ex: sudo webfsd -u nobody, would leave webfsd with all of root's groups! +# +# 3) the supplementary group list is no longer made empty when using -g +# +# 4) supplementary groups are now checked for read access when generating +#directory listings +# +# 5) in ls.c/ls() changed type of uid and gid to uid_t and gid_t +# +# 6) in ls.c/ls() fixed a problem where the uid of the file was being compared +#to the gid of the user to check for readability +# +# 7) added a -G option to ignore/remove all supplementary groups +# +# 8) updated man page to reflect -G option +# +# 9) when the uid is 0, all files are now displayed as readable. +# + +diff -urp webfs-1.21-orig/httpd.h webfs-1.21/httpd.h +--- webfs-1.21-orig/httpd.h2004-06-10 05:45:50.0 -0400 webfs-1.21/httpd.h 2010-03-27 14:57:07.63154 -0400 +@@ -169,6 +169,8 @@ extern intlifespan; + extern intno_listing; + extern time_t now; + extern int have_tty; ++extern gid_t *grp_list; ++extern intgrp_num; + + #ifdef USE_SSL + extern int with_ssl; +diff -urp webfs-1.21-orig/ls.c webfs-1.21/ls.c +--- webfs-1.21-orig/ls.c 2004-06-10 05:45:50.0 -0400 webfs-1.21/ls.c2010-03-28 10:52:09.449259926 -0400 +@@ -194,7 +194,9 @@ ls(time_t now, char *hostname, char *fil + struct myfile **files = NULL; + struct myfile **re1; + char *h1,*h2,*re2,*buf = NULL; +-intcount,len,size,i,uid,gid; ++intcount,len,size,i; ++uid_t uid; ++gid_t gid; + char line[1024]; + char *pw = NULL, *gr = NULL; + +@@ -241,14 +243,23 @@ ls(time_t now, char *hostname, char *fil + files[count]->r = 0; + if (S_ISDIR(files[count]->s.st_mode) || + S_ISREG(files[count]->s.st_mode)) { +- if (files[count]->s.st_uid == uid && ++ if (uid == 0) ++ files[count]->r = 1; ++ else if (files[count]->s.st_uid == uid && + files[count]->s.st_mode & 0400) +
[arch-commits] Commit in webfs/repos (5 files)
Date: Friday, November 9, 2018 @ 22:50:02 Author: foutrelis Revision: 405097 archrelease: copy trunk to community-staging-x86_64 Added: webfs/repos/community-staging-x86_64/ webfs/repos/community-staging-x86_64/PKGBUILD (from rev 405095, webfs/trunk/PKGBUILD) webfs/repos/community-staging-x86_64/webfs.patch (from rev 405095, webfs/trunk/webfs.patch) webfs/repos/community-staging-x86_64/webfsd.conf (from rev 405095, webfs/trunk/webfsd.conf) webfs/repos/community-staging-x86_64/webfsd.service (from rev 405095, webfs/trunk/webfsd.service) + PKGBUILD | 38 webfs.patch| 250 +++ webfsd.conf|5 + webfsd.service | 11 ++ 4 files changed, 304 insertions(+) Copied: webfs/repos/community-staging-x86_64/PKGBUILD (from rev 405095, webfs/trunk/PKGBUILD) === --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-11-09 22:50:02 UTC (rev 405097) @@ -0,0 +1,38 @@ +# Maintainer: Kyle Keen +# Contributor: Roman Kyrylych +# Contributor: Mark Rosenstand +# Contributor: Daniel J Griffiths +# Contributor: Chris Brannon + +pkgname=webfs +pkgver=1.21 +pkgrel=14 +pkgdesc="Simple and instant http server for mostly static content." +arch=(x86_64) +url="http://linux.bytesex.org/misc/webfs.html; +license=("GPL") +depends=('mime-types' 'openssl') +backup=('etc/conf.d/webfsd') +source=(http://dl.bytesex.org/releases/webfs/webfs-${pkgver}.tar.gz +webfsd.conf +webfs.patch +webfsd.service) +md5sums=('6dc125fe160479404147e7bbfc781dbc' + 'b2c1ab041a82acd8391b06dc38d986be' + '7294edcec2589df04bb775270d56536e' + 'e1202dd915cba1a02e0016aa3a516b4a') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + patch -i "$srcdir/webfs.patch" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make prefix=/usr DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/webfsd.conf" "$pkgdir/etc/conf.d/webfsd" + install -Dm644 "$srcdir/webfsd.service" "$pkgdir/usr/lib/systemd/system/webfsd.service" +} Copied: webfs/repos/community-staging-x86_64/webfs.patch (from rev 405095, webfs/trunk/webfs.patch) === --- community-staging-x86_64/webfs.patch(rev 0) +++ community-staging-x86_64/webfs.patch2018-11-09 22:50:02 UTC (rev 405097) @@ -0,0 +1,250 @@ +# This patch performs the following: +# +# 1) user/group names my now be set to the system maximum using +#sysconf(_SC_LOGIN_NAME_MAX). They were previously hardcoded to 16 chars. +# +# 2) supplementary groups are now set according to the user webfs is running as. +#previously they were left as the calling user, which could be dangerous +#ex: sudo webfsd -u nobody, would leave webfsd with all of root's groups! +# +# 3) the supplementary group list is no longer made empty when using -g +# +# 4) supplementary groups are now checked for read access when generating +#directory listings +# +# 5) in ls.c/ls() changed type of uid and gid to uid_t and gid_t +# +# 6) in ls.c/ls() fixed a problem where the uid of the file was being compared +#to the gid of the user to check for readability +# +# 7) added a -G option to ignore/remove all supplementary groups +# +# 8) updated man page to reflect -G option +# +# 9) when the uid is 0, all files are now displayed as readable. +# + +diff -urp webfs-1.21-orig/httpd.h webfs-1.21/httpd.h +--- webfs-1.21-orig/httpd.h2004-06-10 05:45:50.0 -0400 webfs-1.21/httpd.h 2010-03-27 14:57:07.63154 -0400 +@@ -169,6 +169,8 @@ extern intlifespan; + extern intno_listing; + extern time_t now; + extern int have_tty; ++extern gid_t *grp_list; ++extern intgrp_num; + + #ifdef USE_SSL + extern int with_ssl; +diff -urp webfs-1.21-orig/ls.c webfs-1.21/ls.c +--- webfs-1.21-orig/ls.c 2004-06-10 05:45:50.0 -0400 webfs-1.21/ls.c2010-03-28 10:52:09.449259926 -0400 +@@ -194,7 +194,9 @@ ls(time_t now, char *hostname, char *fil + struct myfile **files = NULL; + struct myfile **re1; + char *h1,*h2,*re2,*buf = NULL; +-intcount,len,size,i,uid,gid; ++intcount,len,size,i; ++uid_t uid; ++gid_t gid; + char line[1024]; + char *pw = NULL, *gr = NULL; + +@@ -241,14 +243,23 @@ ls(time_t now, char *hostname, char *fil + files[count]->r = 0; + if (S_ISDIR(files[count]->s.st_mode) || + S_ISREG(files[count]->s.st_mode)) { +- if (files[count]->s.st_uid == uid && ++ if (uid == 0) ++ files[count]->r = 1; ++ else if (files[count]->s.st_uid == uid && + files[count]->s.st_mode & 0400) +