chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] bug or usage problem with posix group-information an


From: Matt Welland
Subject: Re: [Chicken-users] bug or usage problem with posix group-information and there is no change-group?
Date: Wed, 14 Feb 2018 22:55:24 -0700

On Wed, 2018-02-14 at 13:44 +0100, Vasilij Schneidermann wrote:
> Hello Matt,
> 
> > 
> > In the repl calling group-information with the string name of a
> > group
> > works fine, in compiled code I get an error, expected fixnum but
> > received string. I tested with Chicken 4.13
> I can reproduce this with the test code being `(group-information
> "root")`.
> FWIW, I get a warning during compilation, not an error.  The compiled
> code runs just fine and emits the expected result.  This is due to
> the
> relevant entry in the `types.db` file stating that the group-
> information
> procedure accepts an integer only.  If you unpack the release tarball
> and change the enclosed `types.db` to specify `(or string fixnum)`
> for
> the first argument of the function, the compiled CHICKEN should
> behave
> correctly.

Ah, yes, it was a warning, not an error. My mistake.

> 
> > 
> > Also I see a change-file-owner but no change-file-group. A change-
> > file-
> > group would be useful as you can change the group without being
> > root.
> > I.e. an analog to the chgrp command would be useful.
> Have you inspected the documentation of that procedure?  It accepts
> three arguments, the path to the file and the new user ID and group
> ID,
> therefore it allows implementing both `chown` and `chgrp`.  I don't
> think an extra procedure is necessary.
> 

I had tried by setting the user id to my user id and group to the
group-id but it failed - on looking again I see that I was testing in
an xterm where I had not done a newgrp to make the group I'd added for
testing available. My mistake again.

Thanks for taking a look and sorry for the noise.

> Vasilij



reply via email to

[Prev in Thread] Current Thread [Next in Thread]