~ubuntu-branches/ubuntu/raring/unrar-nonfree/raring-proposed

« back to all changes in this revision

Viewing changes to uowners.cpp

  • Committer: Package Import Robot
  • Author(s): Martin Meredith
  • Date: 2012-02-14 22:39:32 UTC
  • mfrom: (1.2.12)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: package-import@ubuntu.com-20120214223932-80w6cf6q639kinh4
Tags: upstream-4.1.4
ImportĀ upstreamĀ versionĀ 4.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
  }
11
11
 
12
12
  struct passwd *pw;
 
13
  errno=0; // Required by getpwnam specification if we need to check errno.
13
14
  if ((pw=getpwnam(Arc.UOHead.OwnerName))==NULL)
14
15
  {
15
16
    Log(Arc.FileName,St(MErrGetOwnerID),Arc.UOHead.OwnerName);
 
17
    ErrHandler.SysErrMsg();
16
18
    ErrHandler.SetErrorCode(WARNING);
17
19
    return;
18
20
  }
19
21
  uid_t OwnerID=pw->pw_uid;
20
22
 
21
23
  struct group *gr;
 
24
  errno=0; // Required by getgrnam specification if we need to check errno.
22
25
  if ((gr=getgrnam(Arc.UOHead.GroupName))==NULL)
23
26
  {
24
27
    Log(Arc.FileName,St(MErrGetGroupID),Arc.UOHead.GroupName);
 
28
    ErrHandler.SysErrMsg();
25
29
    ErrHandler.SetErrorCode(CRC_ERROR);
26
30
    return;
27
31
  }