Bug 4743 - Enabling wtmpx ut_host for the Solaris 8/10 environment
Summary: Enabling wtmpx ut_host for the Solaris 8/10 environment
Status: RESOLVED DUPLICATE of bug 2489
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.25a
Hardware: Other Windows 2000
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 02:27 UTC by Mario Roy (mail address dead)
Modified: 2019-01-06 15:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Roy (mail address dead) 2007-06-26 02:27:23 UTC
Compiled SAMBA 3.0.24, 25, 25a using Sun Studio 11 C compiler.

The wtmp ut_host is not appearing in last output.  Also tried running autogen.sh after installing autoconf -- the same result -- no ut_host output.

g2umor    smb/1                         Tue Jun 26 02:28 - 02:30  (00:02)

The following was done to enable ut_host output for wtmp/last under the Solaris 8/10 environment with Sun Studio 11 C compiler:

g2umor    smb/1        g2umor-pc2.fanni Tue Jun 26 02:28 - 02:30  (00:02)

There are 2 parts:

1. First created a patch to source/smbd/utmp.c  (only a single line change)

diff -ru source/smbd/utmp.c source/smbd.fnma/utmp.c
--- source/smbd/utmp.c 2005-02-25 12:59:26.000000000 -0500
+++ source/smbd.fnma/utmp.c 2007-06-25 23:51:29.000000000 -0400
@@ -410,7 +410,7 @@
  else
   ux.ut_syslen = 0;
 #endif
-#if defined(HAVE_UT_UT_HOST)
+#if defined(HAVE_UT_UT_HOST) || defined(HAVE_UX_UT_HOST)
  utmp_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host));  #endif


2. After running configure, append to include/config.h

  if [[ $(egrep -c "^#define HAVE_UX_UT_HOST" include/config.h) -eq 0 ]]; then
    ( print ""
      print "/* Whether the utmpx struct has a property ut_host */"
      print "#define HAVE_UX_UT_HOST"
      print ""
    ) >> include/config.h
  fi

 - mario
Comment 1 Mario Roy (mail address dead) 2007-06-26 19:43:22 UTC
Updated Summary field to state wtmpx ut_host, not wtmp ut_host.  Was missing the x.

Thanks,
Mario
Comment 2 Björn Jacke 2019-01-06 15:35:11 UTC

*** This bug has been marked as a duplicate of bug 2489 ***