Re: [PATCH 2/2] ima-evm-utils: Never exit with -1 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 30, 2019 at 03:29:39PM +0300, Vitaly Chikunov wrote:
> On Tue, Jul 30, 2019 at 07:57:10AM -0400, Mimi Zohar wrote:
> > On Sat, 2019-07-27 at 06:19 +0300, Vitaly Chikunov wrote:
> > > +		if (err < 0)
> > > +			err = 125;
> > >  	}
> > >  
> > >  	if (eng) {
> > 
> > Agreed we need to return better errors, but instead of always
> > returning 125, would it be better to return the first errno, if err is
> > -1?
> 
> 125 will be not always but only to avoid returning -1 (or any negative).
> 
> There is no practice to exit with errno, AFAIK. Plus, errno we have at
> the end (and which is reported to user) frequently is bogus and that
> should be fixed. (I may do this later maybe, don't know how much work
> that would require).
> 
> We also wish to reserve some exit code as hard error for tests.

I meant 'we also may wish'... This needs to be thought over.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux