Changeset 383 for trunk/src/sh_utmp.c
- Timestamp:
- Dec 5, 2011, 10:30:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_utmp.c
r363 r383 872 872 SL_ENTER(_("sh_utmp_addlogin")); 873 873 874 if (ut->ut_line[0] == '\0') 875 SL_RET0(_("sh_utmp_addlogin")); 876 877 /* for some stupid reason, AIX repeats the wtmp entry for logouts 878 * with ssh 879 */ 880 if (memcmp (&save_utmp, ut, sizeof(struct SH_UTMP_S)) == 0) 881 { 882 memset(&save_utmp, (int) '\0', sizeof(struct SH_UTMP_S)); 883 SL_RET0(_("sh_utmp_addlogin")); 884 } 885 memcpy (&save_utmp, ut, sizeof(struct SH_UTMP_S)); 886 874 887 /* Take the address to keep gcc from putting them into registers. 875 888 * Avoids the 'clobbered by longjmp' warning. … … 877 890 sh_dummy_userold = (void*) &userold; 878 891 sh_dummy_user = (void*) &user; 879 880 if (ut->ut_line[0] == '\0')881 SL_RET0(_("sh_utmp_addlogin"));882 883 /* for some stupid reason, AIX repeats the wtmp entry for logouts884 * with ssh885 */886 if (memcmp (&save_utmp, ut, sizeof(struct SH_UTMP_S)) == 0)887 {888 memset(&save_utmp, (int) '\0', sizeof(struct SH_UTMP_S));889 SL_RET0(_("sh_utmp_addlogin"));890 }891 memcpy (&save_utmp, ut, sizeof(struct SH_UTMP_S));892 893 892 894 893 /* ------- find user -------- … … 993 992 994 993 sh_utmp_login_morechecks(ut); 995 SL_RET0(_("sh_utmp_addlogin"));994 goto out; 996 995 } 997 996 … … 1052 1051 SH_MUTEX_UNLOCK(mutex_thread_nolog); 1053 1052 } 1054 SL_RET0(_("sh_utmp_addlogin"));1053 goto out; 1055 1054 } 1056 1055 1057 1056 /* default */ 1058 SL_RET0(_("sh_utmp_addlogin"));1057 goto out; 1059 1058 1060 1059 /* #ifdef HAVE_UTTYPE */ … … 1136 1135 } 1137 1136 1137 #endif 1138 1139 out: 1140 sh_dummy_user = NULL; 1141 sh_dummy_userold = NULL; 1142 1138 1143 SL_RET0(_("sh_utmp_addlogin")); 1139 #endif1140 1144 } 1141 1145 … … 1214 1218 { 1215 1219 while (this_read < lastread) { 1216 ut =sh_utmp_getutent();1220 (void) sh_utmp_getutent(); 1217 1221 ++this_read; 1218 1222 }
Note:
See TracChangeset
for help on using the changeset viewer.