Example #1
0
 private PasswdInfo parsePasswdInfo(string line)
 {
     PasswdInfo retInfo = null;
     char[] elemseps = { ':' };
     string[] ffields = line.Split(elemseps);
     if (ffields.GetUpperBound(0) == 6)
     {
         retInfo = new PasswdInfo();
         retInfo.UserName = ffields[0];
         retInfo.Password = ffields[1];
         retInfo.Uid = ffields[2];
         retInfo.Gid = ffields[3];
         retInfo.Gecos = ffields[4];
         retInfo.HomeDir = ffields[5];
         retInfo.Shell = ffields[6];
     }
     return retInfo;
 }
Example #2
0
        private PasswdInfo parsePasswdInfo(string line)
        {
            PasswdInfo retInfo = null;

            char[]   elemseps = { ':' };
            string[] ffields  = line.Split(elemseps);
            if (ffields.GetUpperBound(0) == 6)
            {
                retInfo          = new PasswdInfo();
                retInfo.UserName = ffields[0];
                retInfo.Password = ffields[1];
                retInfo.Uid      = ffields[2];
                retInfo.Gid      = ffields[3];
                retInfo.Gecos    = ffields[4];
                retInfo.HomeDir  = ffields[5];
                retInfo.Shell    = ffields[6];
            }
            return(retInfo);
        }