Bug 2111 - Android does not properly implement utmp or wtmp.
Summary: Android does not properly implement utmp or wtmp.
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 6.2p1
Hardware: All Linux
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_3
  Show dependency treegraph
 
Reported: 2013-06-02 02:47 AEST by Nathan Osman
Modified: 2015-08-11 23:03 AEST (History)
1 user (show)

See Also:


Attachments
Disables utmp and wtmp for the Android platform. (546 bytes, patch)
2013-06-02 02:47 AEST, Nathan Osman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Osman 2013-06-02 02:47:29 AEST
Created attachment 2283 [details]
Disables utmp and wtmp for the Android platform.

After applying the latest patches for Android support in OpenSSH that are set for inclusion in 6.3p1, I received the following errors from gcc:

  loginrec.c: In function 'construct_utmp':
  loginrec.c:665:17: error: 'DEAD_PROCESS' undeclared (first use in this function)
  loginrec.c:665:17: note: each undeclared identifier is reported only once for each function it appears in
  loginrec.c: At top level:
  loginrec.c:727:45: warning: 'struct utmpx' declared inside parameter list [enabled by default]
  loginrec.c:727:45: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
  ...

This is because Android does not properly implement utmp or wtmp. It should be disabled when cross-compiling for the platform. I have attached a patch that disables both of these.
Comment 1 Darren Tucker 2013-06-03 02:03:36 AEST
Applied, thanks.
Comment 2 Damien Miller 2015-08-11 23:03:46 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1