Using ‚at‘ as regular user

Bomrek Koganvutram 232.20711 at chiffre.aleturo.com
Sun Apr 24 13:59:13 PDT 2016


Sorry, I missed that I forgot to reply.

That little patch works wonders, now it works.

Thanks! :o)


* karu.pruun on Thu, Mar 17, 2016 at 11:57:37AM +0200:
> The issue seems to be with format conversion. The nuid and ngid get
> their values from fscanf a few lines earlier:
> 
> ---
> 224  if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4)
> 225    perrx("File %s is in wrong format - aborting", filename);
> ---
> 
> where the format fmt is specified above. However, in fmt nuid and ngid
> are assumed %ld, whereas nuid is uid_t which is defined, in the end,
> as unsigned int (but correct me for details). So changing
> 
> %ld --> %u
> 
> resolves the issue. Open/NetBSD both use %u, FreeBSD uses %ld. I
> checked that atrun works on FreeBSD, but a simple code snippet with
> %ld fails to read uid on FreeBSD in the same way it fails on
> DragonFly.
> 
> I attach a simple patch. I filed a bug with the patch as well.
> 
> For the impatient:
> 
> cd /usr/src/libexec/atrun
> apply the patch
> make
> cp atrun /usr/libexec/
> 
> 
> Cheers
> 
> Peeter
> 
> --



-- 
Die Heirat ist die einzige lebenslängliche Verurteilung, bei der man
aufgrund schlechter Führung begnadigt werden kann.
		-- Alfred Hitchcock


More information about the Users mailing list