~ubuntu-branches/ubuntu/trusty/uucp/trusty

« back to all changes in this revision

Viewing changes to unix/ufopen.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter Palfrader
  • Date: 2004-12-30 15:30:22 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041230153022-mx4cdr9j3u9bldo3
Tags: 1.07-12
Add cs localisation for debconf templates (closes: #287305).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ufopen.c
2
2
   Open a file with the permissions of the invoking user.
3
3
 
4
 
   Copyright (C) 1992, 1995 Ian Lance Taylor
 
4
   Copyright (C) 1992, 1995, 2002 Ian Lance Taylor
5
5
 
6
6
   This file is part of the Taylor UUCP package.
7
7
 
17
17
 
18
18
   You should have received a copy of the GNU General Public License
19
19
   along with this program; if not, write to the Free Software
20
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
20
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
21
21
 
22
 
   The author of the program may be contacted at ian@airs.com or
23
 
   c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
 
22
   The author of the program may be contacted at ian@airs.com.
24
23
   */
25
24
 
26
25
#include "uucp.h"
62
61
esysdep_user_fopen (zfile, frd, fbinary)
63
62
     const char *zfile;
64
63
     boolean frd;
65
 
     boolean fbinary;
 
64
     boolean fbinary ATTRIBUTE_UNUSED;
66
65
{
67
66
  uid_t ieuid;
 
67
  gid_t iegid;
68
68
  openfile_t e;
69
69
  const char *zerr;
70
70
  int o = 0;
71
71
 
72
 
  if (! fsuser_perms (&ieuid))
 
72
  if (! fsuser_perms (&ieuid, &iegid))
73
73
    return EFILECLOSED;
74
74
 
75
75
  zerr = NULL;
98
98
    }
99
99
#endif
100
100
 
101
 
  if (! fsuucp_perms ((long) ieuid))
 
101
  if (! fsuucp_perms ((long) ieuid, (long) iegid))
102
102
    {
103
103
      if (ffileisopen (e))
104
104
        (void) ffileclose (e);