Re: chattr on OpenBSD???

2020-04-17 Thread Todd C . Miller
On Fri, 17 Apr 2020 09:11:15 -0600, "Raymond, David" wrote:

> I noticed that chattr exists on OpenBSD.  The man page says it applies
> to Linux file systems (ext* etc).  Two questions:
>
> 1. Does this also apply to OpenBSD's fast file system?  (The man page
> would suggest not.)

No.

> 2. If not, is it of any use on OpenBSD?

Not unless you are using one of the Linux ext* file systems on
OpenBSD.  For native OpenBSD file systems you can use the BSD
chflags(8) command.

 - todd



Re: chattr on OpenBSD???

2020-04-17 Thread Bryan Steele
On Fri, Apr 17, 2020 at 09:11:15AM -0600, Raymond, David wrote:
> I noticed that chattr exists on OpenBSD.  The man page says it applies
> to Linux file systems (ext* etc).  Two questions:

No. You have e2fsprogs installed.

e2fsprogs-1.42.12p5:sysutils/e2fsprogs:/usr/local/man/man1/chattr.1


..bottom of chattr(1):

E2fsprogs version 1.42.12 August 2014CHATTR(1)

-Bryan.



Re: chattr on OpenBSD???

2020-04-17 Thread Raymond, David
Hmm... Why would I want e2fsprogs on OpenBSD???  Oh, I see,
libreoffice drags it in.  One more thing I wish I could dispense with.

Dave

On 4/17/20, Bryan Steele  wrote:
> On Fri, Apr 17, 2020 at 09:11:15AM -0600, Raymond, David wrote:
>> I noticed that chattr exists on OpenBSD.  The man page says it applies
>> to Linux file systems (ext* etc).  Two questions:
>
> No. You have e2fsprogs installed.
>
> e2fsprogs-1.42.12p5:sysutils/e2fsprogs:/usr/local/man/man1/chattr.1
>
>
> ..bottom of chattr(1):
>
> E2fsprogs version 1.42.12 August 2014CHATTR(1)
>
> -Bryan.
>
>


-- 
David J. Raymond
david.raym...@nmt.edu
http://physics.nmt.edu/~raymond



Re: chattr on OpenBSD???

2020-04-17 Thread Todd C . Miller
On Fri, 17 Apr 2020 15:27:33 -0600, "Raymond, David" wrote:

> Hmm... Why would I want e2fsprogs on OpenBSD???  Oh, I see,
> libreoffice drags it in.  One more thing I wish I could dispense with.

A bunch of ports pull it in for its uuid code.

 - todd



Re: chattr on OpenBSD???

2020-04-18 Thread Henri Järvinen
On Fri, Apr 17, 2020 at 09:14:49AM -0600, Todd C. Miller wrote:
> On Fri, 17 Apr 2020 09:11:15 -0600, "Raymond, David" wrote:
> 
> > I noticed that chattr exists on OpenBSD.  The man page says it applies
> > to Linux file systems (ext* etc).  Two questions:
> >
> > 1. Does this also apply to OpenBSD's fast file system?  (The man page
> > would suggest not.)
> 
> No.
> 
> > 2. If not, is it of any use on OpenBSD?
> 
> Not unless you are using one of the Linux ext* file systems on
> OpenBSD.  For native OpenBSD file systems you can use the BSD
> chflags(8) command.
> 
>  - todd
> 
> 

At least lsattr shows flags set by chflags.

-- 
Henri Järvinen



Re: chattr on OpenBSD???

2020-04-20 Thread Fabio Martins


> On Fri, Apr 17, 2020 at 09:14:49AM -0600, Todd C. Miller wrote:
>> On Fri, 17 Apr 2020 09:11:15 -0600, "Raymond, David" wrote:
>>
>> > I noticed that chattr exists on OpenBSD.  The man page says it applies
>> > to Linux file systems (ext* etc).  Two questions:
>> >
>> > 1. Does this also apply to OpenBSD's fast file system?  (The man page
>> > would suggest not.)
>>
>> No.
>>

I see here "chattr +i" does set the uchg flag in a ffs filesystem.

root@localhost:~# ls -lo /etc/resolv.conf
-rw-r--r--  1 root  wheel  - 21 Mar 13 08:18 /etc/resolv.conf

root@localhost:~# chattr +i /etc/resolv.conf

root@localhost:~# ls -lo /etc/resolv.conf
-rw-r--r--  1 root  wheel  uchg 21 Mar 13 08:18 /etc/resolv.conf


>> > 2. If not, is it of any use on OpenBSD?
>>
>> Not unless you are using one of the Linux ext* file systems on
>> OpenBSD.  For native OpenBSD file systems you can use the BSD
>> chflags(8) command.
>>
>>  - todd
>>
>>
>
> At least lsattr shows flags set by chflags.
>
> --
> Henri Järvinen
>
>

-- 
Fabio Martins