openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/src/groupmod.c
static void open_files(void)
{
    if (gr_open(O_CREAT | O_RDWR) == 0)
    {
        fprintf(stderr, _("%s: cannot open %s\n"), Prog, gr_dbname());
        SYSLOG((LOG_WARN, "cannot open %s", gr_dbname()));
        exit(E_GRP_UPDATE);
    }

#ifdef SHADOWGRP
    if (is_shadow_grp && (pflg || nflg))
    {
        if (sgr_open(O_CREAT | O_RDWR) == 0)
        {
            fprintf(stderr, _("%s: cannot open %s\n"), Prog, sgr_dbname());
            SYSLOG((LOG_WARN, "cannot open %s", sgr_dbname()));
            exit(E_GRP_UPDATE);
        }
    }
#endif /* SHADOWGRP */

    if (gflg)
    {
        if (pw_open(O_CREAT | O_RDWR) == 0)
        {
            fprintf(stderr, _("%s: cannot open %s\n"), Prog, pw_dbname());
            SYSLOG((LOG_WARN, "cannot open %s", gr_dbname()));
            exit(E_GRP_UPDATE);
        }
    }
}
/*
 * open_files - open the accounts databases
 *
 *	open_files() opens the group, gshadow, and passwd databases.
 */
open the accounts databases
open_files() opens the group, gshadow, and passwd databases.
open the accounts databases open_files () opens the group gshadow and passwd databases .
static void open_files(void)
{
    if (gr_open(O_CREAT | O_RDWR) == 0)
    {
        fprintf(stderr, _("%s: cannot open %s\n"), Prog, gr_dbname());
        SYSLOG((LOG_WARN, "cannot open %s", gr_dbname()));
        exit(E_GRP_UPDATE);
    }
#ifdef SHADOWGRP
    if (is_shadow_grp && (pflg || nflg))
    {
        if (sgr_open(O_CREAT | O_RDWR) == 0)
        {
            fprintf(stderr, _("%s: cannot open %s\n"), Prog, sgr_dbname());
            SYSLOG((LOG_WARN, "cannot open %s", sgr_dbname()));
            exit(E_GRP_UPDATE);
        }
    }
#endif 
    if (gflg)
    {
        if (pw_open(O_CREAT | O_RDWR) == 0)
        {
            fprintf(stderr, _("%s: cannot open %s\n"), Prog, pw_dbname());
            SYSLOG((LOG_WARN, "cannot open %s", gr_dbname()));
            exit(E_GRP_UPDATE);
        }
    }
}
static void open_files ( void ) { if ( gr_open ( O_CREAT | O_RDWR ) == 0 ) { fprintf ( stderr , _ ( " \n " ) , Prog , gr_dbname ( ) ) ; SYSLOG ( ( LOG_WARN , " " , gr_dbname ( ) ) ) ; exit ( E_GRP_UPDATE ) ; } #ifdef SHADOWGRP if ( is_shadow_grp && ( pflg || nflg ) ) { if ( sgr_open ( O_CREAT | O_RDWR ) == 0 ) { fprintf ( stderr , _ ( " \n " ) , Prog , sgr_dbname ( ) ) ; SYSLOG ( ( LOG_WARN , " " , sgr_dbname ( ) ) ) ; exit ( E_GRP_UPDATE ) ; } } #endif if ( gflg ) { if ( pw_open ( O_CREAT | O_RDWR ) == 0 ) { fprintf ( stderr , _ ( " \n " ) , Prog , pw_dbname ( ) ) ; SYSLOG ( ( LOG_WARN , " " , gr_dbname ( ) ) ) ; exit ( E_GRP_UPDATE ) ; } } }
open_files - open the accounts databases
      open_files() opens the group, gshadow, and passwd databases.
open_files - open the accounts databases open_files () opens the group gshadow and passwd databases .
/* SHADOWGRP */