Hi again,

On 2017-04-10 Mon 14:31 PM |, Craig Skinner wrote:
> On Mon, 10 Apr 2017 12:46:03 +0100 Craig Skinner wrote:
> > <operator@palm:~ 0>$ openssl enc -bf -salt \
> >     -pass file:/etc/myname -in /bsd \
> >     -out /altroot/tmp/bsd.crypto
> > 
> > /altroot: write failed, file system is full
> > <operator@palm:~ 0>$ print $?
> > 0
> 

openssl error exits for other output file creation problems:

<operator@palm:~ 0>$ openssl bf -pass file:/etc/myname -in /bsd -out 
/var/empty/bsd.crypto
/var/empty/bsd.crypto: Permission denied
2133286928:error:0200100D:system library:fopen:Permission 
denied:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/bio/bss_file.c:255:fopen('/var/empty/bsd.crypto',
 'w')
2133286928:error:20074002:BIO routines:FILE_CTRL:system 
lib:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/bio/bss_file.c:257:
<operator@palm:~ 0>$ print $?
1
<operator@palm:~ 0>$ openssl bf -pass file:/etc/myname -in /bsd -out 
/no/where/bsd.crypto
/no/where/bsd.crypto: No such file or directory
2216844688:error:02001002:system library:fopen:No such file or 
directory:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/bio/bss_file.c:255:fopen('/no/where/bsd.crypto',
 'w')
2216844688:error:20074002:BIO routines:FILE_CTRL:system 
lib:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/bio/bss_file.c:257:
<operator@palm:~ 0>$ print $?
1

> 
> Would 74 from sysexits.h be the code to return?:
> EX_IOERR -- An error occurred while doing I/O on some file.
> 

Perhaps this is more relevant:

EX_CANTCREAT -- A (user specified) output file cannot be created.

Cheers,
-- 
Craig Skinner | http://linkd.in/yGqkv7

Reply via email to