chiark / gitweb /
agent: don't print warnings if a password was removed or timed out
authorLennart Poettering <lennart@poettering.net>
Fri, 25 Feb 2011 01:52:07 +0000 (02:52 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 25 Feb 2011 01:52:07 +0000 (02:52 +0100)
src/tty-ask-password-agent.c

index bedb0bc..ee7681a 100644 (file)
@@ -375,7 +375,14 @@ static int parse_password(const char *filename, char **wall) {
                         packet_length = strlen(packet);
                 }
 
+                if (r == -ETIME || r == -ENOENT) {
+                        /* If the query went away, that's OK */
+                        r = 0;
+                        goto finish;
+                }
+
                 if (r < 0) {
+
                         log_error("Failed to query password: %s", strerror(-r));
                         goto finish;
                 }