[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] bug or usage problem with posix group-information an
Re: [Chicken-users] bug or usage problem with posix group-information and there is no change-group?
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
> 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
> relevant entry in the `types.db` file stating that the group-
> procedure accepts an integer only. If you unpack the release tarball
> and change the enclosed `types.db` to specify `(or string fixnum)`
> the first argument of the function, the compiled CHICKEN should
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
> 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.