git: 0cdfa4956424 - main - unzip: Sync with NetBSD upstream.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=0cdfa4956424dc816944a84568a4d9900b68f5e3 commit 0cdfa4956424dc816944a84568a4d9900b68f5e3 Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 01:50:08 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 01:50:08 + unzip: Sync with NetBSD upstream. - Ignore malformed directory entries as created by Dropbox ("/"). (rev 1.24) - Use libarchive 3.x interface: check result for archive_read_free() and don't call archive_read_close manually. (rev 1.23) - Always overwrite symlinks on extraction, ever if they're newer than entries in archive. - Use getline() rather than getdelim(). PR: 231827 Submitted by: ak Reviewed by:mm Obtained from: NetBSD MFC after: 2 weeks --- usr.bin/unzip/unzip.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index c9e53f27ed74..937176111a02 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -385,6 +385,13 @@ extract_dir(struct archive *a, struct archive_entry *e, const char *path) { int mode; + /* +* Dropbox likes to create '/' directory entries, just ignore +* such junk. +*/ + if (*path == '\0') + return; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -451,7 +458,7 @@ handle_existing_file(char **path) free(*path); *path = NULL; alen = 0; - len = getdelim(path, &alen, '\n', stdin); + len = getline(path, &alen, stdin); if ((*path)[len - 1] == '\n') (*path)[len - 1] = '\0'; return 0; @@ -601,7 +608,7 @@ recheck: if (lstat(*path, &sb) == 0) { if (u_opt || f_opt) { /* check if up-to-date */ - if ((S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) && + if (S_ISREG(sb.st_mode) && (sb.st_mtim.tv_sec > mtime.tv_sec || (sb.st_mtim.tv_sec == mtime.tv_sec && sb.st_mtim.tv_nsec >= mtime.tv_nsec))) @@ -916,8 +923,7 @@ unzip(const char *fn) } } - ac(archive_read_close(a)); - (void)archive_read_free(a); + ac(archive_read_free(a)); if (t_opt) { if (error_count > 0) { ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: e03764d931d8 - main - bootparamd: Fix several warnings and increase warn level to 6.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=e03764d931d820185a019334259b18df2e3f6b6c commit e03764d931d820185a019334259b18df2e3f6b6c Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 03:36:09 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 03:36:09 + bootparamd: Fix several warnings and increase warn level to 6. - Increase WARNS to 6. - Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers checks. - Use ANSI C prototype. - Statically variables and functions. - Add extern declaration for global variables. - Rename local variables to resolve shadow warnings. PR: 71667 MFC after: 2 weeks --- usr.sbin/bootparamd/Makefile.inc| 4 +- usr.sbin/bootparamd/bootparamd/bootparamd.c | 83 + usr.sbin/bootparamd/bootparamd/main.c | 15 +++--- usr.sbin/bootparamd/callbootd/callbootd.c | 26 - 4 files changed, 59 insertions(+), 69 deletions(-) diff --git a/usr.sbin/bootparamd/Makefile.inc b/usr.sbin/bootparamd/Makefile.inc index 5c01215dd550..de7ed1c2f55c 100644 --- a/usr.sbin/bootparamd/Makefile.inc +++ b/usr.sbin/bootparamd/Makefile.inc @@ -3,4 +3,6 @@ BINDIR?= /usr/sbin -WARNS?=2 +NO_WCAST_ALIGN= +CWARNFLAGS.clang+= -Wno-incompatible-pointer-types-discards-qualifiers +CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 9c45cf8d0f38..7cc57d2427a4 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -7,10 +7,8 @@ use and modify. Please send modifications and/or suggestions + bug fixes to */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); #ifdef YP #include @@ -27,26 +25,25 @@ static const char rcsid[] = #include #include #include + extern int debug, dolog; extern in_addr_t route_addr; -extern char *bootpfile; +extern const char *bootpfile; #define MAXLEN 800 -struct hostent *he; +static struct hostent *he; static char buffer[MAXLEN]; static char hostname[MAX_MACHINE_NAME]; static char askname[MAX_MACHINE_NAME]; static char path[MAX_PATH_LEN]; static char domain_name[MAX_MACHINE_NAME]; -int getthefile(char *, char *, char *, int); -int checkhost(char *, char *, int); +static int getthefile(char *, char *, char *, int); +static int checkhost(char *, char *, int); bp_whoami_res * -bootparamproc_whoami_1_svc(whoami, req) -bp_whoami_arg *whoami; -struct svc_req *req; +bootparamproc_whoami_1_svc(bp_whoami_arg *whoami, struct svc_req *req __unused) { in_addr_t haddr; static bp_whoami_res res; @@ -110,9 +107,7 @@ struct svc_req *req; bp_getfile_res * - bootparamproc_getfile_1_svc(getfile, req) -bp_getfile_arg *getfile; -struct svc_req *req; +bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unused) { char *where; static bp_getfile_res res; @@ -177,17 +172,14 @@ struct svc_req *req; return(NULL); } -/*getthefile return 1 and fills the buffer with the information +/*getthefile return 1 and fills the buf with the information of the file, e g "host:/export/root/client" if it can be found. - If the host is in the database, but the file is not, the buffer + If the host is in the database, but the file is not, the buf will be empty. (This makes it possible to give the special empty answer for the file "dump") */ -int -getthefile(askname,fileid,buffer,blen) -char *askname; -char *fileid, *buffer; -int blen; +static int +getthefile(char *l_askname, char *fileid, char *buf, int blen) { FILE *bpf; char *where; @@ -211,11 +203,11 @@ int blen; /* XXX see comment below */ while ( fscanf(bpf, "%255s", hostname) > 0 && !match ) { if ( *hostname != '#' ) { /* comment */ - if ( ! strcmp(hostname, askname) ) { + if ( ! strcmp(hostname, l_askname) ) { match = 1; } else { he = gethostbyname(hostname); - if (he && !strcmp(he->h_name, askname)) match = 1; + if (he && !strcmp(he->h_name, l_askname)) match = 1; } } if (*hostname == '+' ) { /* NIS */ @@ -224,16 +216,16 @@ int blen; if (debug) warn("NIS"); return(0); } - if (yp_match(yp_domain, "bootparams", askname, strlen(askname), + if (yp_match(yp_domain, "bootparams", l_askname, strlen(l_askname), &result, &resultlen)) return (0); if (strstr(result, fileid) == NULL) { - buffer[0] = '\0'; + buf[0] = '\0'; } else { - snprintf(buffer, blen, + snprintf(buf, blen,
git: 8c45fe5d8ecd - main - bootparamd: Add missing __unused mark.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=8c45fe5d8ecda4be7564aadaa50712790c6c0a6f commit 8c45fe5d8ecda4be7564aadaa50712790c6c0a6f Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 15:40:34 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 15:40:34 + bootparamd: Add missing __unused mark. e03764d931d820185a019334259b18df2e3f6b6c did not catch all unused variables. Submitted by: otis MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27894 --- usr.sbin/bootparamd/bootparamd/bootparamd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 7cc57d2427a4..be885de62f55 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -179,7 +179,7 @@ bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unuse empty answer for the file "dump") */ static int -getthefile(char *l_askname, char *fileid, char *buf, int blen) +getthefile(char *l_askname, char *fileid, char *buf, int blen __unused) { FILE *bpf; char *where; @@ -285,7 +285,7 @@ getthefile(char *l_askname, char *fileid, char *buf, int blen) name for a host in the database */ static int -checkhost(char *l_askname, char *l_hostname, int len) +checkhost(char *l_askname, char *l_hostname, int len __unused) { int ch, pch; FILE *bpf; ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: c735bf1ae387 - stable/12 - unzip: Sync with NetBSD upstream.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=c735bf1ae3874ce1e9cfa718b95aad628b91f030 commit c735bf1ae3874ce1e9cfa718b95aad628b91f030 Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 01:50:08 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-19 12:20:53 + unzip: Sync with NetBSD upstream. - Ignore malformed directory entries as created by Dropbox ("/"). (rev 1.24) - Use libarchive 3.x interface: check result for archive_read_free() and don't call archive_read_close manually. (rev 1.23) - Always overwrite symlinks on extraction, ever if they're newer than entries in archive. - Use getline() rather than getdelim(). PR: 231827 Submitted by: ak Reviewed by:mm Obtained from: NetBSD (cherry picked from commit 0cdfa4956424dc816944a84568a4d9900b68f5e3) --- usr.bin/unzip/unzip.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index c9e53f27ed74..937176111a02 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -385,6 +385,13 @@ extract_dir(struct archive *a, struct archive_entry *e, const char *path) { int mode; + /* +* Dropbox likes to create '/' directory entries, just ignore +* such junk. +*/ + if (*path == '\0') + return; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -451,7 +458,7 @@ handle_existing_file(char **path) free(*path); *path = NULL; alen = 0; - len = getdelim(path, &alen, '\n', stdin); + len = getline(path, &alen, stdin); if ((*path)[len - 1] == '\n') (*path)[len - 1] = '\0'; return 0; @@ -601,7 +608,7 @@ recheck: if (lstat(*path, &sb) == 0) { if (u_opt || f_opt) { /* check if up-to-date */ - if ((S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) && + if (S_ISREG(sb.st_mode) && (sb.st_mtim.tv_sec > mtime.tv_sec || (sb.st_mtim.tv_sec == mtime.tv_sec && sb.st_mtim.tv_nsec >= mtime.tv_nsec))) @@ -916,8 +923,7 @@ unzip(const char *fn) } } - ac(archive_read_close(a)); - (void)archive_read_free(a); + ac(archive_read_free(a)); if (t_opt) { if (error_count > 0) { ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: b96f027b7102 - stable/12 - bootparamd: Fix several warnings and increase warn level to 6.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=b96f027b71024475d4d9f69176d372956756 commit b96f027b71024475d4d9f69176d372956756 Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 03:36:09 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-19 14:55:16 + bootparamd: Fix several warnings and increase warn level to 6. - Increase WARNS to 6. - Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers checks. - Use ANSI C prototype. - Statically variables and functions. - Add extern declaration for global variables. - Rename local variables to resolve shadow warnings. PR: 71667 (cherry picked from commit e03764d931d820185a019334259b18df2e3f6b6c) --- usr.sbin/bootparamd/Makefile.inc| 4 +- usr.sbin/bootparamd/bootparamd/bootparamd.c | 83 + usr.sbin/bootparamd/bootparamd/main.c | 15 +++--- usr.sbin/bootparamd/callbootd/callbootd.c | 26 - 4 files changed, 59 insertions(+), 69 deletions(-) diff --git a/usr.sbin/bootparamd/Makefile.inc b/usr.sbin/bootparamd/Makefile.inc index 5c01215dd550..de7ed1c2f55c 100644 --- a/usr.sbin/bootparamd/Makefile.inc +++ b/usr.sbin/bootparamd/Makefile.inc @@ -3,4 +3,6 @@ BINDIR?= /usr/sbin -WARNS?=2 +NO_WCAST_ALIGN= +CWARNFLAGS.clang+= -Wno-incompatible-pointer-types-discards-qualifiers +CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 9c45cf8d0f38..7cc57d2427a4 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -7,10 +7,8 @@ use and modify. Please send modifications and/or suggestions + bug fixes to */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); #ifdef YP #include @@ -27,26 +25,25 @@ static const char rcsid[] = #include #include #include + extern int debug, dolog; extern in_addr_t route_addr; -extern char *bootpfile; +extern const char *bootpfile; #define MAXLEN 800 -struct hostent *he; +static struct hostent *he; static char buffer[MAXLEN]; static char hostname[MAX_MACHINE_NAME]; static char askname[MAX_MACHINE_NAME]; static char path[MAX_PATH_LEN]; static char domain_name[MAX_MACHINE_NAME]; -int getthefile(char *, char *, char *, int); -int checkhost(char *, char *, int); +static int getthefile(char *, char *, char *, int); +static int checkhost(char *, char *, int); bp_whoami_res * -bootparamproc_whoami_1_svc(whoami, req) -bp_whoami_arg *whoami; -struct svc_req *req; +bootparamproc_whoami_1_svc(bp_whoami_arg *whoami, struct svc_req *req __unused) { in_addr_t haddr; static bp_whoami_res res; @@ -110,9 +107,7 @@ struct svc_req *req; bp_getfile_res * - bootparamproc_getfile_1_svc(getfile, req) -bp_getfile_arg *getfile; -struct svc_req *req; +bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unused) { char *where; static bp_getfile_res res; @@ -177,17 +172,14 @@ struct svc_req *req; return(NULL); } -/*getthefile return 1 and fills the buffer with the information +/*getthefile return 1 and fills the buf with the information of the file, e g "host:/export/root/client" if it can be found. - If the host is in the database, but the file is not, the buffer + If the host is in the database, but the file is not, the buf will be empty. (This makes it possible to give the special empty answer for the file "dump") */ -int -getthefile(askname,fileid,buffer,blen) -char *askname; -char *fileid, *buffer; -int blen; +static int +getthefile(char *l_askname, char *fileid, char *buf, int blen) { FILE *bpf; char *where; @@ -211,11 +203,11 @@ int blen; /* XXX see comment below */ while ( fscanf(bpf, "%255s", hostname) > 0 && !match ) { if ( *hostname != '#' ) { /* comment */ - if ( ! strcmp(hostname, askname) ) { + if ( ! strcmp(hostname, l_askname) ) { match = 1; } else { he = gethostbyname(hostname); - if (he && !strcmp(he->h_name, askname)) match = 1; + if (he && !strcmp(he->h_name, l_askname)) match = 1; } } if (*hostname == '+' ) { /* NIS */ @@ -224,16 +216,16 @@ int blen; if (debug) warn("NIS"); return(0); } - if (yp_match(yp_domain, "bootparams", askname, strlen(askname), + if (yp_match(yp_domain, "bootparams", l_askname, strlen(l_askname), &result, &resultlen)) return (0); if (strstr(result, fileid) == NULL) { - buffer[0] = '\0'; + buf[0] = '\0'; } else {
git: 580311ef3283 - stable/12 - bootparamd: Add missing __unused mark.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=580311ef32836ef7f4c40be59a6f12784c9d94fd commit 580311ef32836ef7f4c40be59a6f12784c9d94fd Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 15:40:34 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-19 14:55:40 + bootparamd: Add missing __unused mark. e03764d931d820185a019334259b18df2e3f6b6c did not catch all unused variables. Submitted by: otis Differential Revision: https://reviews.freebsd.org/D27894 (cherry picked from commit 8c45fe5d8ecda4be7564aadaa50712790c6c0a6f) --- usr.sbin/bootparamd/bootparamd/bootparamd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 7cc57d2427a4..be885de62f55 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -179,7 +179,7 @@ bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unuse empty answer for the file "dump") */ static int -getthefile(char *l_askname, char *fileid, char *buf, int blen) +getthefile(char *l_askname, char *fileid, char *buf, int blen __unused) { FILE *bpf; char *where; @@ -285,7 +285,7 @@ getthefile(char *l_askname, char *fileid, char *buf, int blen) name for a host in the database */ static int -checkhost(char *l_askname, char *l_hostname, int len) +checkhost(char *l_askname, char *l_hostname, int len __unused) { int ch, pch; FILE *bpf; ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: 7033fd68f7ef - stable/12 - bootparamd: Fix build with GCC.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=7033fd68f7efbe8d249e2001e58e4e08c403f5bd commit 7033fd68f7efbe8d249e2001e58e4e08c403f5bd Author: Yoshihiro Takahashi AuthorDate: 2021-01-19 17:41:37 + Commit: Yoshihiro Takahashi CommitDate: 2021-01-19 17:41:37 + bootparamd: Fix build with GCC. Remove CWARNFLAGS for GCC because GCC 4.2.1 does not have -Wdiscarded-qualifiers option. This is direct commit to stable/12. Pointy hat to: nyan --- usr.sbin/bootparamd/Makefile.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bootparamd/Makefile.inc b/usr.sbin/bootparamd/Makefile.inc index de7ed1c2f55c..2ba4149d5ada 100644 --- a/usr.sbin/bootparamd/Makefile.inc +++ b/usr.sbin/bootparamd/Makefile.inc @@ -5,4 +5,3 @@ BINDIR?=/usr/sbin NO_WCAST_ALIGN= CWARNFLAGS.clang+= -Wno-incompatible-pointer-types-discards-qualifiers -CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: d653b188e89b - main - ng_ether: Create netgraph nodes for bridge interfaces.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=d653b188e89b5e44b2708342c7d3b789398f9cde commit d653b188e89b5e44b2708342c7d3b789398f9cde Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:24:33 + Commit: Yoshihiro Takahashi CommitDate: 2021-09-25 16:24:33 + ng_ether: Create netgraph nodes for bridge interfaces. Create netgraph nodes for bridge interfaces when the ng_ether module is loaded. If a bridge interface is created after loading the ng_ether module, a netgraph node is created via ether_ifattach(). MFC after: 1 week --- sys/netgraph/ng_ether.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 5718de235c4c..40e06604b8bb 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -414,7 +414,9 @@ ng_ether_ifnet_arrival_event(void *arg __unused, struct ifnet *ifp) node_p node; /* Only ethernet interfaces are of interest. */ - if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) + if (ifp->if_type != IFT_ETHER && + ifp->if_type != IFT_L2VLAN && + ifp->if_type != IFT_BRIDGE) return; /* @@ -868,8 +870,9 @@ vnet_ng_ether_init(const void *unused) /* Create nodes for any already-existing Ethernet interfaces. */ IFNET_RLOCK(); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_type == IFT_ETHER - || ifp->if_type == IFT_L2VLAN) + if (ifp->if_type == IFT_ETHER || + ifp->if_type == IFT_L2VLAN || + ifp->if_type == IFT_BRIDGE) ng_ether_attach(ifp); } IFNET_RUNLOCK(); ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: a4724ff48108 - main - unzip: sync with NetBSD upstream to add passphrase support
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=a4724ff48108840416c83f10e15d666ac8d78937 commit a4724ff48108840416c83f10e15d666ac8d78937 Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:32:42 + Commit: Yoshihiro Takahashi CommitDate: 2021-09-25 16:32:42 + unzip: sync with NetBSD upstream to add passphrase support - Add support for password protected zip archives. We use memset_s() rather than explicit_bzero() for more portable (See PR). - Use success/failure macro in exit() - Mention ZIPX format in unzip(1) Submitted by: Mingye Wang and Alex Kozlov (ak@) PR: 244181 Reviewed by:mizhka Obtained from: NetBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28892 --- usr.bin/unzip/unzip.1 | 10 ++-- usr.bin/unzip/unzip.c | 66 --- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index b7c2d858f012..bb43abf43a85 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2015 +.Dd September 25, 2021 .Dt UNZIP 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl aCcfjLlnopqtuvy .Op Fl d Ar dir +.Op Fl x Ar pattern +.Op Fl P Ar password .Ar zipfile .Sh DESCRIPTION .\" ... @@ -81,6 +83,10 @@ When extracting files from the zipfile, they are written to stdout. The normal output is suppressed as if .Fl q was specified. +.It Fl P Ar password +Extract encrypted files using a password. +Putting a password on the command line using this option can be +insecure. .It Fl q Quiet: print less information while extracting. .It Fl t @@ -172,7 +178,7 @@ utility is only able to process ZIP archives handled by .Xr libarchive 3 . Depending on the installed version of .Xr libarchive 3 , -this may or may not include self-extracting archives. +this may or may not include self-extracting or ZIPX archives. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 937176111a02..e5ca1ff2c939 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -51,6 +51,7 @@ #include #include +#include /* command-line options */ static int a_opt; /* convert EOL */ @@ -63,6 +64,7 @@ static int L_opt; /* lowercase names */ static int n_opt; /* never overwrite */ static int o_opt; /* always overwrite */ static int p_opt; /* extract to stdout, quiet */ +static char*P_arg; /* passphrase */ static int q_opt; /* quiet */ static int t_opt; /* test */ static int u_opt; /* update */ @@ -95,6 +97,9 @@ static int tty; */ static int noeol; +/* for an interactive passphrase input */ +static char *passphrase_buf; + /* fatal error message + errno */ static void error(const char *fmt, ...) @@ -109,7 +114,7 @@ error(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, ": %s\n", strerror(errno)); - exit(1); + exit(EXIT_FAILURE); } /* fatal error message, no errno */ @@ -126,7 +131,7 @@ errorx(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); - exit(1); + exit(EXIT_FAILURE); } /* non-fatal error message + errno */ @@ -854,6 +859,36 @@ test(struct archive *a, struct archive_entry *e) return error_count; } +/* + * Callback function for reading passphrase. + * Originally from cpio.c and passphrase.c, libarchive. + */ +#define PPBUFF_SIZE 1024 +static const char * +passphrase_callback(struct archive *a, void *_client_data) +{ + char *p; + + (void)a; /* UNUSED */ + (void)_client_data; /* UNUSED */ + + if (passphrase_buf == NULL) { + passphrase_buf = malloc(PPBUFF_SIZE); + if (passphrase_buf == NULL) { + errno = ENOMEM; + error("malloc()"); + } + } + + p = readpassphrase("\nEnter password: ", passphrase_buf, + PPBUFF_SIZE, RPP_ECHO_OFF); + + if (p == NULL && errno != EINTR) + error("Error reading password"); + + return p; +} + /* * Main loop: open the zipfile, iterate over its contents and decide what * to do with each entry. @@ -870,6 +905,13 @@ unzip(const char *fn) error("archive_read_new failed"); ac(archive_read_support_format_zip(a)); + + if (P_arg) + archive_read_add_passphrase(a, P_arg); + else + archive_read_set_passphrase_callback(a, NULL, + &a
git: e08940243162 - stable/13 - ng_ether: Create netgraph nodes for bridge interfaces.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=e08940243162f918f01751a70e159c8c7fbfa6a0 commit e08940243162f918f01751a70e159c8c7fbfa6a0 Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:24:33 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-02 11:51:14 + ng_ether: Create netgraph nodes for bridge interfaces. Create netgraph nodes for bridge interfaces when the ng_ether module is loaded. If a bridge interface is created after loading the ng_ether module, a netgraph node is created via ether_ifattach(). (cherry picked from commit d653b188e89b5e44b2708342c7d3b789398f9cde) --- sys/netgraph/ng_ether.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 5718de235c4c..40e06604b8bb 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -414,7 +414,9 @@ ng_ether_ifnet_arrival_event(void *arg __unused, struct ifnet *ifp) node_p node; /* Only ethernet interfaces are of interest. */ - if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) + if (ifp->if_type != IFT_ETHER && + ifp->if_type != IFT_L2VLAN && + ifp->if_type != IFT_BRIDGE) return; /* @@ -868,8 +870,9 @@ vnet_ng_ether_init(const void *unused) /* Create nodes for any already-existing Ethernet interfaces. */ IFNET_RLOCK(); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_type == IFT_ETHER - || ifp->if_type == IFT_L2VLAN) + if (ifp->if_type == IFT_ETHER || + ifp->if_type == IFT_L2VLAN || + ifp->if_type == IFT_BRIDGE) ng_ether_attach(ifp); } IFNET_RUNLOCK(); ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: db79ace65626 - stable/12 - ng_ether: Create netgraph nodes for bridge interfaces.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=db79ace65626d81834888b69b0f6c12a034c8891 commit db79ace65626d81834888b69b0f6c12a034c8891 Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:24:33 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-02 11:54:19 + ng_ether: Create netgraph nodes for bridge interfaces. Create netgraph nodes for bridge interfaces when the ng_ether module is loaded. If a bridge interface is created after loading the ng_ether module, a netgraph node is created via ether_ifattach(). (cherry picked from commit d653b188e89b5e44b2708342c7d3b789398f9cde) --- sys/netgraph/ng_ether.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 770cd2bbbafd..e47bad496d65 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -414,7 +414,9 @@ ng_ether_ifnet_arrival_event(void *arg __unused, struct ifnet *ifp) node_p node; /* Only ethernet interfaces are of interest. */ - if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) + if (ifp->if_type != IFT_ETHER && + ifp->if_type != IFT_L2VLAN && + ifp->if_type != IFT_BRIDGE) return; /* @@ -868,8 +870,9 @@ vnet_ng_ether_init(const void *unused) /* Create nodes for any already-existing Ethernet interfaces. */ IFNET_RLOCK(); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_type == IFT_ETHER - || ifp->if_type == IFT_L2VLAN) + if (ifp->if_type == IFT_ETHER || + ifp->if_type == IFT_L2VLAN || + ifp->if_type == IFT_BRIDGE) ng_ether_attach(ifp); } IFNET_RUNLOCK(); ___ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"
git: cea130c0b8f5 - stable/13 - unzip: sync with NetBSD upstream to add passphrase support
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=cea130c0b8f5a32b0e4a22befb89bad73f8663c2 commit cea130c0b8f5a32b0e4a22befb89bad73f8663c2 Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:32:42 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-02 11:56:19 + unzip: sync with NetBSD upstream to add passphrase support - Add support for password protected zip archives. We use memset_s() rather than explicit_bzero() for more portable (See PR). - Use success/failure macro in exit() - Mention ZIPX format in unzip(1) Submitted by: Mingye Wang and Alex Kozlov (ak@) PR: 244181 Reviewed by:mizhka Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D28892 (cherry picked from commit a4724ff48108840416c83f10e15d666ac8d78937) --- usr.bin/unzip/unzip.1 | 10 ++-- usr.bin/unzip/unzip.c | 66 --- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index b7c2d858f012..bb43abf43a85 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2015 +.Dd September 25, 2021 .Dt UNZIP 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl aCcfjLlnopqtuvy .Op Fl d Ar dir +.Op Fl x Ar pattern +.Op Fl P Ar password .Ar zipfile .Sh DESCRIPTION .\" ... @@ -81,6 +83,10 @@ When extracting files from the zipfile, they are written to stdout. The normal output is suppressed as if .Fl q was specified. +.It Fl P Ar password +Extract encrypted files using a password. +Putting a password on the command line using this option can be +insecure. .It Fl q Quiet: print less information while extracting. .It Fl t @@ -172,7 +178,7 @@ utility is only able to process ZIP archives handled by .Xr libarchive 3 . Depending on the installed version of .Xr libarchive 3 , -this may or may not include self-extracting archives. +this may or may not include self-extracting or ZIPX archives. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 937176111a02..e5ca1ff2c939 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -51,6 +51,7 @@ #include #include +#include /* command-line options */ static int a_opt; /* convert EOL */ @@ -63,6 +64,7 @@ static int L_opt; /* lowercase names */ static int n_opt; /* never overwrite */ static int o_opt; /* always overwrite */ static int p_opt; /* extract to stdout, quiet */ +static char*P_arg; /* passphrase */ static int q_opt; /* quiet */ static int t_opt; /* test */ static int u_opt; /* update */ @@ -95,6 +97,9 @@ static int tty; */ static int noeol; +/* for an interactive passphrase input */ +static char *passphrase_buf; + /* fatal error message + errno */ static void error(const char *fmt, ...) @@ -109,7 +114,7 @@ error(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, ": %s\n", strerror(errno)); - exit(1); + exit(EXIT_FAILURE); } /* fatal error message, no errno */ @@ -126,7 +131,7 @@ errorx(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); - exit(1); + exit(EXIT_FAILURE); } /* non-fatal error message + errno */ @@ -854,6 +859,36 @@ test(struct archive *a, struct archive_entry *e) return error_count; } +/* + * Callback function for reading passphrase. + * Originally from cpio.c and passphrase.c, libarchive. + */ +#define PPBUFF_SIZE 1024 +static const char * +passphrase_callback(struct archive *a, void *_client_data) +{ + char *p; + + (void)a; /* UNUSED */ + (void)_client_data; /* UNUSED */ + + if (passphrase_buf == NULL) { + passphrase_buf = malloc(PPBUFF_SIZE); + if (passphrase_buf == NULL) { + errno = ENOMEM; + error("malloc()"); + } + } + + p = readpassphrase("\nEnter password: ", passphrase_buf, + PPBUFF_SIZE, RPP_ECHO_OFF); + + if (p == NULL && errno != EINTR) + error("Error reading password"); + + return p; +} + /* * Main loop: open the zipfile, iterate over its contents and decide what * to do with each entry. @@ -870,6 +905,13 @@ unzip(const char *fn) error("archive_read_new failed"); ac(archive_read_support_format_zip(a)); + + if (P_arg) + archive_read_add_passphrase(a, P_arg); + else + archive_read_set_
git: 970c3982cd6a - stable/12 - unzip: sync with NetBSD upstream to add passphrase support
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=970c3982cd6a05efe9b4666a8a7f98670f18f36e commit 970c3982cd6a05efe9b4666a8a7f98670f18f36e Author: Yoshihiro Takahashi AuthorDate: 2021-09-25 16:32:42 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-02 11:57:24 + unzip: sync with NetBSD upstream to add passphrase support - Add support for password protected zip archives. We use memset_s() rather than explicit_bzero() for more portable (See PR). - Use success/failure macro in exit() - Mention ZIPX format in unzip(1) Submitted by: Mingye Wang and Alex Kozlov (ak@) PR: 244181 Reviewed by:mizhka Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D28892 (cherry picked from commit a4724ff48108840416c83f10e15d666ac8d78937) --- usr.bin/unzip/unzip.1 | 10 ++-- usr.bin/unzip/unzip.c | 66 --- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index b7c2d858f012..bb43abf43a85 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2015 +.Dd September 25, 2021 .Dt UNZIP 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl aCcfjLlnopqtuvy .Op Fl d Ar dir +.Op Fl x Ar pattern +.Op Fl P Ar password .Ar zipfile .Sh DESCRIPTION .\" ... @@ -81,6 +83,10 @@ When extracting files from the zipfile, they are written to stdout. The normal output is suppressed as if .Fl q was specified. +.It Fl P Ar password +Extract encrypted files using a password. +Putting a password on the command line using this option can be +insecure. .It Fl q Quiet: print less information while extracting. .It Fl t @@ -172,7 +178,7 @@ utility is only able to process ZIP archives handled by .Xr libarchive 3 . Depending on the installed version of .Xr libarchive 3 , -this may or may not include self-extracting archives. +this may or may not include self-extracting or ZIPX archives. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 937176111a02..e5ca1ff2c939 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -51,6 +51,7 @@ #include #include +#include /* command-line options */ static int a_opt; /* convert EOL */ @@ -63,6 +64,7 @@ static int L_opt; /* lowercase names */ static int n_opt; /* never overwrite */ static int o_opt; /* always overwrite */ static int p_opt; /* extract to stdout, quiet */ +static char*P_arg; /* passphrase */ static int q_opt; /* quiet */ static int t_opt; /* test */ static int u_opt; /* update */ @@ -95,6 +97,9 @@ static int tty; */ static int noeol; +/* for an interactive passphrase input */ +static char *passphrase_buf; + /* fatal error message + errno */ static void error(const char *fmt, ...) @@ -109,7 +114,7 @@ error(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, ": %s\n", strerror(errno)); - exit(1); + exit(EXIT_FAILURE); } /* fatal error message, no errno */ @@ -126,7 +131,7 @@ errorx(const char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); - exit(1); + exit(EXIT_FAILURE); } /* non-fatal error message + errno */ @@ -854,6 +859,36 @@ test(struct archive *a, struct archive_entry *e) return error_count; } +/* + * Callback function for reading passphrase. + * Originally from cpio.c and passphrase.c, libarchive. + */ +#define PPBUFF_SIZE 1024 +static const char * +passphrase_callback(struct archive *a, void *_client_data) +{ + char *p; + + (void)a; /* UNUSED */ + (void)_client_data; /* UNUSED */ + + if (passphrase_buf == NULL) { + passphrase_buf = malloc(PPBUFF_SIZE); + if (passphrase_buf == NULL) { + errno = ENOMEM; + error("malloc()"); + } + } + + p = readpassphrase("\nEnter password: ", passphrase_buf, + PPBUFF_SIZE, RPP_ECHO_OFF); + + if (p == NULL && errno != EINTR) + error("Error reading password"); + + return p; +} + /* * Main loop: open the zipfile, iterate over its contents and decide what * to do with each entry. @@ -870,6 +905,13 @@ unzip(const char *fn) error("archive_read_new failed"); ac(archive_read_support_format_zip(a)); + + if (P_arg) + archive_read_add_passphrase(a, P_arg); + else + archive_read_set_
git: 2c614481fd52 - main - unzip: Fix segmentation fault if a zip file contains buggy filename.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=2c614481fd5248c1685e713f67d40cf2d5fba494 commit 2c614481fd5248c1685e713f67d40cf2d5fba494 Author: Yoshihiro Takahashi AuthorDate: 2021-10-10 11:49:19 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-10 11:49:19 + unzip: Fix segmentation fault if a zip file contains buggy filename. PR: 259011 Reported by:Robert Morris Submitted by: ak MFC after:: 1 week --- usr.bin/unzip/unzip.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index e5ca1ff2c939..0b564b0f08ec 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -211,6 +211,9 @@ pathdup(const char *path) char *str; size_t i, len; + if (path == NULL || path[0] == '\0') + return (NULL); + len = strlen(path); while (len && path[len - 1] == '/') len--; @@ -697,7 +700,11 @@ extract(struct archive *a, struct archive_entry *e) mode_t filetype; char *p, *q; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* sanity checks */ @@ -760,7 +767,11 @@ extract_stdout(struct archive *a, struct archive_entry *e) char *pathname; mode_t filetype; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* I don't think this can happen in a zipfile.. */
git: 3bfe213143c5 - stable/13 - unzip: Fix segmentation fault if a zip file contains buggy filename.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=3bfe213143c562154e04d840380651f182df04de commit 3bfe213143c562154e04d840380651f182df04de Author: Yoshihiro Takahashi AuthorDate: 2021-10-10 11:49:19 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-18 11:16:02 + unzip: Fix segmentation fault if a zip file contains buggy filename. PR: 259011 Reported by:Robert Morris Submitted by: ak (cherry picked from commit 2c614481fd5248c1685e713f67d40cf2d5fba494) --- usr.bin/unzip/unzip.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index e5ca1ff2c939..0b564b0f08ec 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -211,6 +211,9 @@ pathdup(const char *path) char *str; size_t i, len; + if (path == NULL || path[0] == '\0') + return (NULL); + len = strlen(path); while (len && path[len - 1] == '/') len--; @@ -697,7 +700,11 @@ extract(struct archive *a, struct archive_entry *e) mode_t filetype; char *p, *q; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* sanity checks */ @@ -760,7 +767,11 @@ extract_stdout(struct archive *a, struct archive_entry *e) char *pathname; mode_t filetype; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* I don't think this can happen in a zipfile.. */
git: 94c3735b74f7 - stable/12 - unzip: Fix segmentation fault if a zip file contains buggy filename.
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=94c3735b74f796a8b271091a8ebc276021345d79 commit 94c3735b74f796a8b271091a8ebc276021345d79 Author: Yoshihiro Takahashi AuthorDate: 2021-10-10 11:49:19 + Commit: Yoshihiro Takahashi CommitDate: 2021-10-18 11:17:27 + unzip: Fix segmentation fault if a zip file contains buggy filename. PR: 259011 Reported by:Robert Morris Submitted by: ak (cherry picked from commit 2c614481fd5248c1685e713f67d40cf2d5fba494) --- usr.bin/unzip/unzip.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index e5ca1ff2c939..0b564b0f08ec 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -211,6 +211,9 @@ pathdup(const char *path) char *str; size_t i, len; + if (path == NULL || path[0] == '\0') + return (NULL); + len = strlen(path); while (len && path[len - 1] == '/') len--; @@ -697,7 +700,11 @@ extract(struct archive *a, struct archive_entry *e) mode_t filetype; char *p, *q; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* sanity checks */ @@ -760,7 +767,11 @@ extract_stdout(struct archive *a, struct archive_entry *e) char *pathname; mode_t filetype; - pathname = pathdup(archive_entry_pathname(e)); + if ((pathname = pathdup(archive_entry_pathname(e))) == NULL) { + warningx("skipping empty or unreadable filename entry"); + ac(archive_read_data_skip(a)); + return; + } filetype = archive_entry_filetype(e); /* I don't think this can happen in a zipfile.. */
git: a1f28ec729f7 - main - unzip: Document optional member list
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f28ec729f7491da8607e8eeaee1b0f547c60d0 commit a1f28ec729f7491da8607e8eeaee1b0f547c60d0 Author: Yoshihiro Takahashi AuthorDate: 2023-01-02 04:17:27 + Commit: Yoshihiro Takahashi CommitDate: 2023-01-02 04:17:27 + unzip: Document optional member list Submitted by: Pat Maddox (man page) PR: 267426 MFC after: 2 weeks --- usr.bin/unzip/unzip.1 | 8 +++- usr.bin/unzip/unzip.c | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index bb43abf43a85..82e2c3a60ea0 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2021 +.Dd January 2, 2023 .Dt UNZIP 1 .Os .Sh NAME @@ -38,6 +38,7 @@ .Op Fl x Ar pattern .Op Fl P Ar password .Ar zipfile +.Op Ar member ... .Sh DESCRIPTION .\" ... The following options are available: @@ -120,6 +121,11 @@ mode changes the way in which additional arguments are parsed. Currently only .Xr zipinfo 1L mode 1 is supported, which lists the file names one per line. +.It Ar [member ...] +Optional list of members to extract from the zipfile. +Can include patterns, e.g. +.Ar 'memberdir/*' +will extract all files and dirs below memberdir. .El .Pp Note that only one of diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 0b564b0f08ec..78731555eadc 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -998,8 +998,9 @@ static void usage(void) { - fprintf(stderr, "Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] " - "[-x pattern] [-P password] zipfile\n"); + fprintf(stderr, +"Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] [-x pattern] [-P password] zipfile\n" +" [member ...]\n"); exit(EXIT_FAILURE); }
git: a73118389b4c - stable/13 - unzip: Document optional member list
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=a73118389b4c776fb70b2d26c7a4b9d05df2e8b8 commit a73118389b4c776fb70b2d26c7a4b9d05df2e8b8 Author: Yoshihiro Takahashi AuthorDate: 2023-01-02 04:17:27 + Commit: Yoshihiro Takahashi CommitDate: 2023-01-22 10:45:46 + unzip: Document optional member list Submitted by: Pat Maddox (man page) PR: 267426 (cherry picked from commit a1f28ec729f7491da8607e8eeaee1b0f547c60d0) --- usr.bin/unzip/unzip.1 | 8 +++- usr.bin/unzip/unzip.c | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index bb43abf43a85..82e2c3a60ea0 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2021 +.Dd January 2, 2023 .Dt UNZIP 1 .Os .Sh NAME @@ -38,6 +38,7 @@ .Op Fl x Ar pattern .Op Fl P Ar password .Ar zipfile +.Op Ar member ... .Sh DESCRIPTION .\" ... The following options are available: @@ -120,6 +121,11 @@ mode changes the way in which additional arguments are parsed. Currently only .Xr zipinfo 1L mode 1 is supported, which lists the file names one per line. +.It Ar [member ...] +Optional list of members to extract from the zipfile. +Can include patterns, e.g. +.Ar 'memberdir/*' +will extract all files and dirs below memberdir. .El .Pp Note that only one of diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 0b564b0f08ec..78731555eadc 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -998,8 +998,9 @@ static void usage(void) { - fprintf(stderr, "Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] " - "[-x pattern] [-P password] zipfile\n"); + fprintf(stderr, +"Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] [-x pattern] [-P password] zipfile\n" +" [member ...]\n"); exit(EXIT_FAILURE); }
git: 9c9e31b9ac7b - stable/12 - unzip: Document optional member list
The branch stable/12 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=9c9e31b9ac7ba6dd7078aeae5ec4b119c651efc9 commit 9c9e31b9ac7ba6dd7078aeae5ec4b119c651efc9 Author: Yoshihiro Takahashi AuthorDate: 2023-01-02 04:17:27 + Commit: Yoshihiro Takahashi CommitDate: 2023-01-22 10:48:17 + unzip: Document optional member list Submitted by: Pat Maddox (man page) PR: 267426 (cherry picked from commit a1f28ec729f7491da8607e8eeaee1b0f547c60d0) --- usr.bin/unzip/unzip.1 | 8 +++- usr.bin/unzip/unzip.c | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index bb43abf43a85..82e2c3a60ea0 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 2021 +.Dd January 2, 2023 .Dt UNZIP 1 .Os .Sh NAME @@ -38,6 +38,7 @@ .Op Fl x Ar pattern .Op Fl P Ar password .Ar zipfile +.Op Ar member ... .Sh DESCRIPTION .\" ... The following options are available: @@ -120,6 +121,11 @@ mode changes the way in which additional arguments are parsed. Currently only .Xr zipinfo 1L mode 1 is supported, which lists the file names one per line. +.It Ar [member ...] +Optional list of members to extract from the zipfile. +Can include patterns, e.g. +.Ar 'memberdir/*' +will extract all files and dirs below memberdir. .El .Pp Note that only one of diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 0b564b0f08ec..78731555eadc 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -998,8 +998,9 @@ static void usage(void) { - fprintf(stderr, "Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] " - "[-x pattern] [-P password] zipfile\n"); + fprintf(stderr, +"Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] [-x pattern] [-P password] zipfile\n" +" [member ...]\n"); exit(EXIT_FAILURE); }
git: 5704277ae58b - main - puc: Add support for Exar XR17V354 Quad PCI Express UART.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=5704277ae58b3498fbee2d041cd18d2444f5cf98 commit 5704277ae58b3498fbee2d041cd18d2444f5cf98 Author: Teerayut Hiruntaraporn AuthorDate: 2024-01-08 06:31:19 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 06:31:19 + puc: Add support for Exar XR17V354 Quad PCI Express UART. PR: 257207 MFC after: 1 week --- sys/dev/puc/pucdata.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 3114202c3a5a..f127e27e7b08 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -694,6 +694,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_exar_pcie }, + { 0x13a8, 0x0354, 0x, 0, + "Exar XR17V354", + 12500, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ { 0x13a8, 0x0358, 0x, 0, "Exar XR17V358",
git: 9a622787244c - main - mii: Fix memory leak in micphy.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=9a622787244c4cda76d1509b0eae168bf4fd1952 commit 9a622787244c4cda76d1509b0eae168bf4fd1952 Author: Jiahao LI AuthorDate: 2024-01-08 07:39:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 07:39:56 + mii: Fix memory leak in micphy. PR: 270040 MFC after: 1 week --- sys/dev/mii/micphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index fa212bf43655..4783398886f5 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -276,6 +276,8 @@ micphy_attach(device_t dev) else ksz9021_load_values(sc, cfg->phynode); + mii_fdt_free_config(cfg); + return (0); }
git: 58cf91d3b72a - main - resolv: Add a required include to resolv.h
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=58cf91d3b72a01777bacf72d66a648a744ae3143 commit 58cf91d3b72a01777bacf72d66a648a744ae3143 Author: Jan Beich AuthorDate: 2024-01-08 11:52:08 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 11:52:08 + resolv: Add a required include to resolv.h Add a required include to resolv.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. PR: 182466 MFC after: 1 week --- include/resolv.h| 1 + lib/libc/net/resolver.3 | 5 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index 40ca2e8a467f..f32f52bab431 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -58,6 +58,7 @@ #include #include #include +#include #include /*% diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 832fa05e994b..f1220dcf9b7f 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2022 +.Dd January 8, 2024 .Dt RESOLVER 3 .Os .Sh NAME @@ -45,9 +45,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query
git: 1fa4ddcc6de6 - main - periodic: Fix periodic reports when log files are not compressed.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce commit 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce Author: Yoshihiro Takahashi AuthorDate: 2024-01-10 11:48:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-10 11:48:56 + periodic: Fix periodic reports when log files are not compressed. The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by:delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357 --- usr.sbin/periodic/etc/security/800.loginfail | 7 +-- usr.sbin/periodic/etc/security/900.tcpwrap | 7 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 4329728f9505..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index ae081ded6a95..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/messages ] && cat $LOG/messages }
git: 4776a7f06e81 - stable/14 - puc: Add support for Exar XR17V354 Quad PCI Express UART.
The branch stable/14 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=4776a7f06e81d93c5305f958d76aeb18b08fb5ec commit 4776a7f06e81d93c5305f958d76aeb18b08fb5ec Author: Teerayut Hiruntaraporn AuthorDate: 2024-01-08 06:31:19 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:22:48 + puc: Add support for Exar XR17V354 Quad PCI Express UART. PR: 257207 MFC after: 1 week (cherry picked from commit 5704277ae58b3498fbee2d041cd18d2444f5cf98) --- sys/dev/puc/pucdata.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 3114202c3a5a..f127e27e7b08 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -694,6 +694,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_exar_pcie }, + { 0x13a8, 0x0354, 0x, 0, + "Exar XR17V354", + 12500, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ { 0x13a8, 0x0358, 0x, 0, "Exar XR17V358",
git: 819934841ab0 - stable/13 - puc: Add support for Exar XR17V354 Quad PCI Express UART.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=819934841ab0c079f2170467052ba87bd316730a commit 819934841ab0c079f2170467052ba87bd316730a Author: Teerayut Hiruntaraporn AuthorDate: 2024-01-08 06:31:19 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:24:37 + puc: Add support for Exar XR17V354 Quad PCI Express UART. PR: 257207 MFC after: 1 week (cherry picked from commit 5704277ae58b3498fbee2d041cd18d2444f5cf98) --- sys/dev/puc/pucdata.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 3114202c3a5a..f127e27e7b08 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -694,6 +694,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_exar_pcie }, + { 0x13a8, 0x0354, 0x, 0, + "Exar XR17V354", + 12500, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ { 0x13a8, 0x0358, 0x, 0, "Exar XR17V358",
git: fbc5e31c4f1e - stable/14 - mii: Fix memory leak in micphy.
The branch stable/14 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc5e31c4f1e97139aa718baafec096ead8139dd commit fbc5e31c4f1e97139aa718baafec096ead8139dd Author: Jiahao LI AuthorDate: 2024-01-08 07:39:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:26:02 + mii: Fix memory leak in micphy. PR: 270040 MFC after: 1 week (cherry picked from commit 9a622787244c4cda76d1509b0eae168bf4fd1952) --- sys/dev/mii/micphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index fa212bf43655..4783398886f5 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -276,6 +276,8 @@ micphy_attach(device_t dev) else ksz9021_load_values(sc, cfg->phynode); + mii_fdt_free_config(cfg); + return (0); }
git: e31753a02475 - stable/13 - mii: Fix memory leak in micphy.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=e31753a024758a1aa5db95950497c7f04e245b42 commit e31753a024758a1aa5db95950497c7f04e245b42 Author: Jiahao LI AuthorDate: 2024-01-08 07:39:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:26:49 + mii: Fix memory leak in micphy. PR: 270040 MFC after: 1 week (cherry picked from commit 9a622787244c4cda76d1509b0eae168bf4fd1952) --- sys/dev/mii/micphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index 57ae7e362a9f..f2a6d0b1f5b1 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -278,6 +278,8 @@ micphy_attach(device_t dev) else ksz9021_load_values(sc, cfg->phynode); + mii_fdt_free_config(cfg); + return (0); }
git: 5a70219b209f - stable/14 - resolv: Add a required include to resolv.h
The branch stable/14 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=5a70219b209f4ba8e8244d3886d364da4c00e4df commit 5a70219b209f4ba8e8244d3886d364da4c00e4df Author: Jan Beich AuthorDate: 2024-01-08 11:52:08 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:33:59 + resolv: Add a required include to resolv.h Add a required include to resolv.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. PR: 182466 MFC after: 1 week (cherry picked from commit 58cf91d3b72a01777bacf72d66a648a744ae3143) --- include/resolv.h| 1 + lib/libc/net/resolver.3 | 5 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index 467648b2aa53..b3986d35bc56 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -59,6 +59,7 @@ #include #include #include +#include #include /*% diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index e11159583f55..5ddbbc6fa1dd 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -27,7 +27,7 @@ .\" .\" @(#)resolver.3 8.1 (Berkeley) 6/4/93 .\" -.Dd September 15, 2022 +.Dd January 8, 2024 .Dt RESOLVER 3 .Os .Sh NAME @@ -47,9 +47,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query
git: 4487c6281b6a - stable/13 - resolv: Add a required include to resolv.h
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=4487c6281b6a9347731a06aafada7be57aa2fe19 commit 4487c6281b6a9347731a06aafada7be57aa2fe19 Author: Jan Beich AuthorDate: 2024-01-08 11:52:08 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-15 10:35:35 + resolv: Add a required include to resolv.h Add a required include to resolv.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. PR: 182466 MFC after: 1 week (cherry picked from commit 58cf91d3b72a01777bacf72d66a648a744ae3143) --- include/resolv.h| 1 + lib/libc/net/resolver.3 | 5 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index 467648b2aa53..b3986d35bc56 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -59,6 +59,7 @@ #include #include #include +#include #include /*% diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index e11159583f55..5ddbbc6fa1dd 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -27,7 +27,7 @@ .\" .\" @(#)resolver.3 8.1 (Berkeley) 6/4/93 .\" -.Dd September 15, 2022 +.Dd January 8, 2024 .Dt RESOLVER 3 .Os .Sh NAME @@ -47,9 +47,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query
git: dd5dabe28483 - stable/14 - periodic: Fix periodic reports when log files are not compressed.
The branch stable/14 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=dd5dabe284831a40bb8ef4749b352c03bf9f4a44 commit dd5dabe284831a40bb8ef4749b352c03bf9f4a44 Author: Yoshihiro Takahashi AuthorDate: 2024-01-10 11:48:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-24 12:04:50 + periodic: Fix periodic reports when log files are not compressed. The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by:delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357 (cherry picked from commit 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce) --- usr.sbin/periodic/etc/security/800.loginfail | 7 +-- usr.sbin/periodic/etc/security/900.tcpwrap | 7 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 4329728f9505..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index ae081ded6a95..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/messages ] && cat $LOG/messages }
git: f148fbe15373 - stable/13 - periodic: Fix periodic reports when log files are not compressed.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=f148fbe153738776c0e2263754e38cf7e0beb63e commit f148fbe153738776c0e2263754e38cf7e0beb63e Author: Yoshihiro Takahashi AuthorDate: 2024-01-10 11:48:56 + Commit: Yoshihiro Takahashi CommitDate: 2024-01-24 12:08:58 + periodic: Fix periodic reports when log files are not compressed. The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by:delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357 (cherry picked from commit 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce) --- usr.sbin/periodic/etc/security/800.loginfail | 5 + usr.sbin/periodic/etc/security/900.tcpwrap | 5 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 713f4fed47bf..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -49,10 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index 132bc9865b18..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -49,10 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/messages ] && cat $LOG/messages }
git: f4ff5481d871 - stable/13 - uart: Add support for Brainboxes / Intashield serial cards.
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=f4ff5481d8713ce3a37b4f2d48d7948e5bd3696b commit f4ff5481d8713ce3a37b4f2d48d7948e5bd3696b Author: Yoshihiro Takahashi AuthorDate: 2024-12-31 09:04:27 + Commit: Yoshihiro Takahashi CommitDate: 2025-01-11 08:13:45 + uart: Add support for Brainboxes / Intashield serial cards. PR: 283226 Reported by:Cameron Williams (cherry picked from commit 41b30bbc1a57b60afee9acdd6ad240c92ef13790) --- sys/dev/puc/pucdata.c | 422 sys/dev/uart/uart_bus_pci.c | 14 ++ 2 files changed, 436 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index f127e27e7b08..e911a407cca9 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -493,6 +493,428 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_siig }, + { 0x135a, 0x0841, 0x, 0, + "Brainboxes UC-268", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0861, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0862, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0863, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0881, 0x, 0, + "Brainboxes UC-279", + DEFAULT_RCLK, + PUC_PORT_8S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a1, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a2, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a3, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08c1, 0x, 0, + "Brainboxes UC-310", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e1, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e2, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e3, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0901, 0x, 0, + "Brainboxes UC-431", + DEFAULT_RCLK, + PUC_PORT_3S, 0x18, 0, 8, + }, + + { 0x135a, 0x0921, 0x, 0, + "Brainboxes UC-420", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0981, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0982, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a1, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a2, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a3, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a81, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a82, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a83, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac1, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac2, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac3, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0b01, 0x, 0, + "Brainbo
git: e5869ff39d4a - stable/14 - uart: Add support for Brainboxes / Intashield serial cards.
The branch stable/14 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=e5869ff39d4a66ebf8940355df3f62663babbb26 commit e5869ff39d4a66ebf8940355df3f62663babbb26 Author: Yoshihiro Takahashi AuthorDate: 2024-12-31 09:04:27 + Commit: Yoshihiro Takahashi CommitDate: 2025-01-11 08:09:41 + uart: Add support for Brainboxes / Intashield serial cards. PR: 283226 Reported by:Cameron Williams (cherry picked from commit 41b30bbc1a57b60afee9acdd6ad240c92ef13790) --- sys/dev/puc/pucdata.c | 422 sys/dev/uart/uart_bus_pci.c | 14 ++ 2 files changed, 436 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index f127e27e7b08..e911a407cca9 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -493,6 +493,428 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_siig }, + { 0x135a, 0x0841, 0x, 0, + "Brainboxes UC-268", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0861, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0862, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0863, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0881, 0x, 0, + "Brainboxes UC-279", + DEFAULT_RCLK, + PUC_PORT_8S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a1, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a2, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a3, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08c1, 0x, 0, + "Brainboxes UC-310", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e1, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e2, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e3, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0901, 0x, 0, + "Brainboxes UC-431", + DEFAULT_RCLK, + PUC_PORT_3S, 0x18, 0, 8, + }, + + { 0x135a, 0x0921, 0x, 0, + "Brainboxes UC-420", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0981, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0982, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a1, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a2, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a3, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a81, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a82, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a83, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac1, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac2, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac3, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0b01, 0x, 0, + "Brainbo
git: 41b30bbc1a57 - main - uart: Add support for Brainboxes / Intashield serial cards.
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=41b30bbc1a57b60afee9acdd6ad240c92ef13790 commit 41b30bbc1a57b60afee9acdd6ad240c92ef13790 Author: Yoshihiro Takahashi AuthorDate: 2024-12-31 09:04:27 + Commit: Yoshihiro Takahashi CommitDate: 2024-12-31 09:04:27 + uart: Add support for Brainboxes / Intashield serial cards. PR: 283226 Reported by:Cameron Williams --- sys/dev/puc/pucdata.c | 422 sys/dev/uart/uart_bus_pci.c | 14 ++ 2 files changed, 436 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index f127e27e7b08..e911a407cca9 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -493,6 +493,428 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_siig }, + { 0x135a, 0x0841, 0x, 0, + "Brainboxes UC-268", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0861, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0862, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0863, 0x, 0, + "Brainboxes UC-257", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0881, 0x, 0, + "Brainboxes UC-279", + DEFAULT_RCLK, + PUC_PORT_8S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a1, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a2, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08a3, 0x, 0, + "Brainboxes UC-313", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08c1, 0x, 0, + "Brainboxes UC-310", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e1, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e2, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x08e3, 0x, 0, + "Brainboxes UC-302", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0901, 0x, 0, + "Brainboxes UC-431", + DEFAULT_RCLK, + PUC_PORT_3S, 0x18, 0, 8, + }, + + { 0x135a, 0x0921, 0x, 0, + "Brainboxes UC-420", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0, 8, + }, + + { 0x135a, 0x0981, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0982, 0x, 0, + "Brainboxes UC-475", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a1, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a2, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x09a3, 0x, 0, + "Brainboxes UC-607", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a81, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a82, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0a83, 0x, 0, + "Brainboxes UC-357", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac1, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac2, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0ac3, 0x, 0, + "Brainboxes UP-189", + DEFAULT_RCLK, + PUC_PORT_2S, 0x18, 0, 8, + }, + + { 0x135a, 0x0b01, 0x, 0, + "Brainboxes UC-346", + DEFAULT_RCLK, + PUC_PORT_4S, 0x18, 0,