Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(OpenBSD) stat: unknown option -- c #383

Open
dspruell opened this issue Apr 1, 2021 · 0 comments
Open

(OpenBSD) stat: unknown option -- c #383

dspruell opened this issue Apr 1, 2021 · 0 comments
Labels
Milestone

Comments

@dspruell
Copy link

dspruell commented Apr 1, 2021

OpenBSD 6.8 amd64
clamav-unofficial-sigs v7.2.2 -> v7.2.5 (upgrade)

Noticed the following errors when running --upgrade:

# /usr/local/sbin/clamav-unofficial-sigs.sh --upgrade
################################################################################
 eXtremeSHOK.com ClamAV Unofficial Signature Updater
 Version: v7.2.2 (2020-12-20)
 Required Configuration Version: v95
 Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com
################################################################################
Loading config: /etc/clamav-unofficial-sigs/master.conf
Loading config: /etc/clamav-unofficial-sigs/os.conf
Loading config: /etc/clamav-unofficial-sigs/user.conf
+++++++++++++++++++++++++++++++++++++++++++++++
NOTICE: GnuPG / signature verification disabled
+++++++++++++++++++++++++++++++++++++++++++++++
Checking for updates ...
***************************************
ALERT: Upgrading config from v95 to v97
***************************************
Downloading https://raw.githubusercontent.com/extremeshok/clamav-unofficial-sigs/master/config/master.conf
stat: unknown option -- c
usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
Running update process
chmod: invalid file mode: 
===========================================================================
ERROR: unable to set permissions on /etc/clamav-unofficial-sigs/master.conf
===========================================================================

GNU coreutils stat(1) supports -c --format=FORMAT but this is not portable; BSD uses -f format.

I think this may provide the same output format as coreutils stat(1):

stat -f "%OLp" /etc/clamav-unofficial-sigs/master.conf
644

This syntax seems to work in OpenBSD, FreeBSD, and macOS. It matches the manual pages for NetBSD, DragonFly BSD and MirBSD.

@extremeshok extremeshok added the bug label Apr 6, 2021
@extremeshok extremeshok added this to the 7.2.6 milestone Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants