Re: [PATCH 3/3] chsh: Add libuser support

Cody Maloney
2013-01-08T06:18:49Z

I definitely don't mind depending on the newer version. I'll update
the patch(es) with both your comments, and write up the patch for
chfn. I should have them done and sent to the list in the next couple
of days.

On Mon, Jan 7, 2013 at 4:51 AM, Karel Zak <kzak@redhat.com> wrote:
> On Thu, Jan 03, 2013 at 11:34:11AM -0500, Miloslav Trmac wrote:
>> > + memset(&val, 0, sizeof(val));
>> > + g_value_init(&val, G_TYPE_STRING);
>> > + g_value_set_string(&val, shell);
>> > +
>> > + lu_ent_clear(ent, LU_LOGINSHELL);
>> > + lu_ent_add(ent, LU_LOGINSHELL, &val);
>> If you don't mind depending on libuser >= 0.58, all of the above can be replaced with
>> > lu_ent_set_string(ent, LU_LOGINSHELL, shell);
>> and you can drop the "g_value_unset" calls as well.
>
> It would be nice to drop g_* junk :-)
>
>
> Karel
>
> --
> Karel Zak <kzak@redhat.com>
> http://karelzak.blogspot.com