[coldsync-hackers] Getting users id of the user running sync?

0 views
Skip to first unread message

Izzy Blacklock

unread,
Jun 10, 2003, 5:10:31 PM6/10/03
to coldsync...@googlegroups.com
Is there a way of getting the user name of the person running the sync? Or
more more accurately, the user who's palm is in the cradle? I need a
solution that works when coldsync is started manually by the user or in
daemon mode. Is there a HEADER value or something that provides this?

...Izzy

--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majo...@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-ha...@thedotin.net.

Alex Tronin

unread,
Jun 10, 2003, 7:00:36 PM6/10/03
to coldsync...@googlegroups.com
Coldsync daemon has palm_username value - add it to set of headers in
conduit.c
Like this:

++last_header;
headers[last_header].name = "Palm_hot_sync_name";
headers[last_header].value = (char *)palm_username(palm);

Make sure palm is visible in coduit.c
Best of luck hacking conduit.c and coldsync.c

Alex Tronin

Christophe Beauregard

unread,
Jun 10, 2003, 8:23:36 PM6/10/03
to coldsync...@googlegroups.com
On Tuesday 10 June 2003 19:00, Alex Tronin wrote:
> Coldsync daemon has palm_username value - add it to set of headers in
> conduit.c
> Like this:
>
> ++last_header;
> headers[last_header].name = "Palm_hot_sync_name";
> headers[last_header].value = (char *)palm_username(palm);

The PDA-Username header already exists (at least in the CVS version).

run_mode_Daemon in runmode.c does a setuid(2), so the effective userid is
set appropriately for any conduit. This means that $EUID (geteuid(2))
should provide the appropriate Unix-side identity?

c.

Reply all
Reply to author
Forward
0 new messages