Print this page
3124 Remove any existing references to utmp, use utmpx instead

*** 24,34 **** /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma ident "%Z%%M% %I% %E% SMI" /* * create entries for users who are still logged on when accounting * is being run. Look at utmpx, and update the time stamp. New info * goes to wtmpx. Called by runacct. */ --- 24,34 ---- /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! /* * create entries for users who are still logged on when accounting * is being run. Look at utmpx, and update the time stamp. New info * goes to wtmpx. Called by runacct. */
*** 53,65 **** WTMPX_FILE, strerror(errno)); exit(1); } while ((utmpx = getutxent()) != NULL) { ! if ((utmpx->ut_type == USER_PROCESS) && !(nonuser(*utmpx))) { time(&utmpx->ut_xtime); ! fwrite(utmpx, sizeof(*utmpx), 1, fp); } } fclose(fp); exit(0); } --- 53,65 ---- WTMPX_FILE, strerror(errno)); exit(1); } while ((utmpx = getutxent()) != NULL) { ! if ((utmpx->ut_type == USER_PROCESS) && !(nonuserx(*utmpx))) { time(&utmpx->ut_xtime); ! fwrite(utmpx, sizeof (*utmpx), 1, fp); } } fclose(fp); exit(0); }