~ubuntu-branches/ubuntu/natty/gnome-keyring/natty-proposed

« back to all changes in this revision

Viewing changes to daemon/control/gkd-control-server.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-10 21:37:48 UTC
  • mfrom: (1.1.59 upstream)
  • Revision ID: james.westby@ubuntu.com-20100310213748-imimrnfxu32ih4t3
Tags: 2.29.92-0ubuntu1
* New upstream version:
  - Fix various problems with not storing secret value properly.
  - Return no results when a search includes a bad collection identifier.
  - Don't raise error if ssh client disconnects early.
  - Allow running in a test environment.
  - Fix error when setting default keyring to NULL.
  - Autostart gnome-keyring-daemon in LXDE as well.
  - Rework the startup again, to use a singleton crontrolled via dbus, to help
    when no process was started by pam.
  - Display password and confirm prompts when creating keyring.
  - Allow specifying CKA_ID when creating collection.
  - Give translatable label to created login keyring.
  - When no default keyring set, use login keyring.
  - Fix problem initializing socket path in rpc module.
  - Fix endless loop in reading data.
  - Potential fix or sporadic crash.
  - Solaris build fixes.
  - Updated translations.
* debian/patches/05_git_no_read_looping.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
 
170
170
        if (cond & G_IO_OUT) {
171
171
                res = write (fd, buffer->buf + cdata->position, buffer->len - cdata->position);
172
 
                if (res <= 0) {
 
172
                if (res < 0) {
173
173
                        if (errno != EAGAIN && errno != EINTR)
174
174
                                cdata->position = buffer->len;
 
175
                } else if (res == 0) {
 
176
                        cdata->position = buffer->len;
175
177
                } else {
176
178
                        cdata->position += res;
177
179
                        g_assert (cdata->position <= buffer->len);
247
249
                /* Time for reading credentials */
248
250
                if (cdata->position == 0) {
249
251
                        if (egg_unix_credentials_read (fd, &pid, &uid) < 0) {
250
 
                                if (errno != EAGAIN || errno != EINTR)
 
252
                                if (errno != EAGAIN && errno != EINTR)
251
253
                                        finished = TRUE;
252
254
                        } else if (getuid () != uid) {
253
255
                                g_message ("control request from bad uid: %u, should be %u\n", uid, getuid ());
260
262
                } else if (egg_buffer_length (buffer) < 4) {
261
263
                        egg_buffer_reserve (buffer, 4);
262
264
                        res = read (fd, buffer->buf + buffer->len, 4 - buffer->len);
263
 
                        if (res <= 0) {
264
 
                                if (errno != EAGAIN || errno != EINTR)
 
265
                        if (res < 0) {
 
266
                                if (errno != EAGAIN && errno != EINTR)
265
267
                                        finished = TRUE;
 
268
                        } else if (res == 0) {
 
269
                                finished = TRUE;
266
270
                        } else {
267
271
                                buffer->len += res;
268
272
                        }
276
280
                                g_assert (buffer->len < packet_size);
277
281
                                egg_buffer_reserve (buffer, packet_size);
278
282
                                res = read (fd, buffer->buf + buffer->len, packet_size - buffer->len);
279
 
                                if (res <= 0) {
 
283
                                if (res < 0) {
280
284
                                        if (errno != EAGAIN && errno != EINTR)
281
285
                                                finished = TRUE;
 
286
                                } else if (res == 0) {
 
287
                                        finished = TRUE;
282
288
                                } else {
283
289
                                        buffer->len += res;
284
290
                                        g_assert (buffer->len <= packet_size);