[Pkg-shadow-devel] getting tcb patches into shadow

"Paweł Hajdan, Jr." phajdan.jr at gentoo.org
Sat Jan 30 09:50:25 UTC 2010


On 1/29/10 6:08 PM, Nicolas François wrote:
> Is it impossible to implement a pwconv with TCP?
> Or should it be something like "does not work yet with tcb enabled\n"?

I think it'd make pwconv/pwunconv overly complex if they had to deal
with tcb. We have tcb_convert/unconvert in tcb package to deal with
shadow<->tcb conversion. pwconv/unconv deal with shadow<->passwd conversion.

>> +		if (!shadowtcb_drop_priv())
>> +			vipwexit (_("failed to gain privileges"), errno, 1);
> 
> That's a failed to drop privileges.

Fixed.

>> +		if (stat(file, &st1))
>> +			vipwexit (_("failed to stat edited file"), errno, 1);
>> +		asprintf(&to_rename, "%s+", file);
> 
> asprintf is GNU specific, if it could be avoided, that would be better.

I removed its usage from all files except tcbfuncs.c (I just don't want
to make too changes at once; I think the next step could be to add an
replacement in tcbfuncs.c in case asprintf isn't available). Please note
that asprintf is easier to read and is also available on BSD.

> BTW, do you think the format should be described in shadow(5)?

I'm not sure what format you refer to. All tcb-specific things are
documented in tcb(5), and format of each tcb shadow file line is the
same as normal shadow line.

Attached the updated patch.

Paweł
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: shadow-tcb.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20100130/39aea655/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20100130/39aea655/attachment-0001.pgp>


More information about the Pkg-shadow-devel mailing list