~ubuntu-branches/ubuntu/intrepid/shadow/intrepid-updates

« back to all changes in this revision

Viewing changes to libmisc/utmp.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2004-09-14 01:01:32 UTC
  • Revision ID: james.westby@ubuntu.com-20040914010132-caqdvzrhku8od2qk
Tags: 1:4.0.3-28.5ubuntu6
Update German translation of passwd/user-fullname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
                /* XXX - assumes /dev/tty?? */
112
112
                strncpy(utent.ut_id, utent.ut_line + 3, sizeof utent.ut_id);
113
113
                strcpy(utent.ut_user, "LOGIN");
114
 
                time(&utent.ut_time);
 
114
                utent.ut_time = time(0);
115
115
        }
116
116
}
117
117
 
195
195
                strcpy(utent.ut_user, "LOGIN");
196
196
                utent.ut_pid = getpid();
197
197
                utent.ut_type = LOGIN_PROCESS;
198
 
                time(&utent.ut_time);
 
198
                utent.ut_time = time(0);
199
199
#if HAVE_UTMPX_H
200
200
                strncpy(utxent.ut_line, line, sizeof utxent.ut_line);
201
201
                if ((utx = getutxline(&utxent)))
204
204
                strcpy(utxent.ut_user, "LOGIN");
205
205
                utxent.ut_pid = utent.ut_pid;
206
206
                utxent.ut_type = utent.ut_type;
207
 
                gettimeofday((struct timeval *) &utxent.ut_tv, NULL);
 
207
                /* don't assume that utmpx.ut_tv is a struct timeval */
 
208
                {
 
209
                    struct timeval tv;
 
210
 
 
211
                    gettimeofday(&tv, NULL);
 
212
 
 
213
                    utxent.ut_tv.tv_sec = tv.tv_sec;
 
214
                    utxent.ut_tv.tv_usec = tv.tv_usec;
 
215
                }
208
216
                utent.ut_time = utxent.ut_tv.tv_sec;
209
217
#endif
210
218
        }
230
238
                line += 5;
231
239
 
232
240
        (void) strncpy (utent.ut_line, line, sizeof utent.ut_line);
233
 
        (void) time (&utent.ut_time);
 
241
        utent.ut_time = time(0);
234
242
}
235
243
 
236
244
#endif  /* !USG */
286
294
{
287
295
        utent.ut_type = USER_PROCESS;
288
296
        strncpy(utent.ut_user, name, sizeof utent.ut_user);
289
 
        time(&utent.ut_time);
 
297
        utent.ut_time = time(0);
290
298
        /* other fields already filled in by checkutmp above */
291
299
        setutent();
292
300
        pututline(&utent);
375
383
 
376
384
        utline.ut_type = utxline.ut_type = USER_PROCESS;
377
385
 
378
 
        gettimeofday(&utxline.ut_tv, NULL);
 
386
        /* don't assume that utmpx.ut_tv is a struct timeval */
 
387
        {
 
388
            struct timeval tv;
 
389
 
 
390
            gettimeofday(&tv, NULL);
 
391
            utxline.ut_tv.tv_sec = tv.tv_sec;
 
392
            utxline.ut_tv.tv_usec = tv.tv_usec;
 
393
        }
379
394
        utline.ut_time = utxline.ut_tv.tv_sec;
380
395
 
381
396
        strncpy(utxline.ut_host, host ? host : "", sizeof utxline.ut_host);
435
450
         * Put in the current time (common to everyone)
436
451
         */
437
452
 
438
 
        (void) time (&utmp.ut_time);
 
453
        utmp.ut_time = time(0);
439
454
 
440
455
#ifdef UT_HOST
441
456
        /*