~logan/ubuntu/trusty/pinentry/0.8.3-1ubuntu1

« back to all changes in this revision

Viewing changes to secmem/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2005-01-27 19:10:07 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050127191007-83ptn4mcw63mu085
Tags: 0.7.2-1
* New upstream release
* Added new -gtk2 flavor.
* Build dependencies revised accordingly.
* Added more copyright holders to debian/copyright.
* Removed compatibility symlinks.
* Converted to CDBS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
       __result; }))
42
42
#endif
43
43
 
 
44
#ifndef HAVE_DOSISH_SYSTEM
44
45
static int uid_set = 0;
45
46
static uid_t real_uid, file_uid;
 
47
#endif /*!HAVE_DOSISH_SYSTEM*/
46
48
 
47
49
/* write DATA of size BYTES to FD, until all is written or an error occurs */
48
50
ssize_t xwrite(int fd, const void *data, size_t bytes)
78
80
#endif
79
81
 
80
82
/* initialize uid variables */
 
83
#ifndef HAVE_DOSISH_SYSTEM
81
84
static void init_uids(void)
82
85
{
83
86
  real_uid = getuid();
84
87
  file_uid = geteuid();
85
88
  uid_set = 1;
86
89
}
 
90
#endif
87
91
 
88
92
 
89
93
#if 0 /* Not used. */
121
125
/* drop all additional privileges */
122
126
void drop_privs()
123
127
{
 
128
#ifndef HAVE_DOSISH_SYSTEM
124
129
  if (!uid_set)
125
130
    init_uids();
126
131
  if (real_uid != file_uid) {
130
135
    }
131
136
    file_uid = real_uid;
132
137
  }
 
138
#endif
133
139
}