summaryrefslogtreecommitdiff
path: root/tests/virnetdaemondata
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2019-06-25 20:17:27 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2019-07-12 16:55:39 +0100
commit1519c55dc81800cfcda572c44fc7546f4fb077ca (patch)
treeeed2e06a96093310533f89dd54ad58b7b48cf1d1 /tests/virnetdaemondata
parent9f3d1c5c8f1f2c5531333148954179e5497b3db6 (diff)
downloadlibvirt-1519c55dc81800cfcda572c44fc7546f4fb077ca.tar.gz
rpc: avoid unlinking sockets passed in from systemd
Currently the socket code will unlink any UNIX socket path which is associated with a server socket. This is not fine grained enough, as we need to avoid unlinking server sockets we were passed by systemd. To deal with this we must explicitly track whether each socket needs to be unlinked when closed, separately of the client vs server state. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/virnetdaemondata')
-rw-r--r--tests/virnetdaemondata/input-data-anon-clients.json12
-rw-r--r--tests/virnetdaemondata/output-data-admin-server-names.json24
-rw-r--r--tests/virnetdaemondata/output-data-admin.json24
-rw-r--r--tests/virnetdaemondata/output-data-anon-clients.json12
-rw-r--r--tests/virnetdaemondata/output-data-client-auth-pending.json12
-rw-r--r--tests/virnetdaemondata/output-data-client-ids.json12
-rw-r--r--tests/virnetdaemondata/output-data-client-timestamp.json12
-rw-r--r--tests/virnetdaemondata/output-data-initial.json12
-rw-r--r--tests/virnetdaemondata/output-data-no-keepalive-required.json24
9 files changed, 96 insertions, 48 deletions
diff --git a/tests/virnetdaemondata/input-data-anon-clients.json b/tests/virnetdaemondata/input-data-anon-clients.json
index 8058fe0a43..3ca2af3899 100644
--- a/tests/virnetdaemondata/input-data-anon-clients.json
+++ b/tests/virnetdaemondata/input-data-anon-clients.json
@@ -17,7 +17,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -30,7 +31,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -44,7 +46,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -56,7 +59,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-admin-server-names.json b/tests/virnetdaemondata/output-data-admin-server-names.json
index 04cb5e6bb3..4488a23291 100644
--- a/tests/virnetdaemondata/output-data-admin-server-names.json
+++ b/tests/virnetdaemondata/output-data-admin-server-names.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
@@ -87,7 +91,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -100,7 +105,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -116,7 +122,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -130,7 +137,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-admin.json b/tests/virnetdaemondata/output-data-admin.json
index 04cb5e6bb3..4488a23291 100644
--- a/tests/virnetdaemondata/output-data-admin.json
+++ b/tests/virnetdaemondata/output-data-admin.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
@@ -87,7 +91,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -100,7 +105,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -116,7 +122,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -130,7 +137,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-anon-clients.json b/tests/virnetdaemondata/output-data-anon-clients.json
index 49fe89be48..c7090d2ed8 100644
--- a/tests/virnetdaemondata/output-data-anon-clients.json
+++ b/tests/virnetdaemondata/output-data-anon-clients.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-client-auth-pending.json b/tests/virnetdaemondata/output-data-client-auth-pending.json
index 0675404e6c..9011588d8d 100644
--- a/tests/virnetdaemondata/output-data-client-auth-pending.json
+++ b/tests/virnetdaemondata/output-data-client-auth-pending.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-client-ids.json b/tests/virnetdaemondata/output-data-client-ids.json
index 90c3383a93..5840757614 100644
--- a/tests/virnetdaemondata/output-data-client-ids.json
+++ b/tests/virnetdaemondata/output-data-client-ids.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-client-timestamp.json b/tests/virnetdaemondata/output-data-client-timestamp.json
index 9cfb069793..e685475c4a 100644
--- a/tests/virnetdaemondata/output-data-client-timestamp.json
+++ b/tests/virnetdaemondata/output-data-client-timestamp.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -49,7 +51,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -64,7 +67,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-initial.json b/tests/virnetdaemondata/output-data-initial.json
index 916297c59d..f887d37379 100644
--- a/tests/virnetdaemondata/output-data-initial.json
+++ b/tests/virnetdaemondata/output-data-initial.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
diff --git a/tests/virnetdaemondata/output-data-no-keepalive-required.json b/tests/virnetdaemondata/output-data-no-keepalive-required.json
index 04cb5e6bb3..4488a23291 100644
--- a/tests/virnetdaemondata/output-data-no-keepalive-required.json
+++ b/tests/virnetdaemondata/output-data-no-keepalive-required.json
@@ -19,7 +19,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -32,7 +33,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -48,7 +50,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -62,7 +65,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}
@@ -87,7 +91,8 @@
"fd": 100,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
},
@@ -100,7 +105,8 @@
"fd": 101,
"errfd": -1,
"pid": 0,
- "isClient": false
+ "isClient": false,
+ "unlinkUNIX": true
}
]
}
@@ -116,7 +122,8 @@
"fd": 102,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
},
@@ -130,7 +137,8 @@
"fd": 103,
"errfd": -1,
"pid": -1,
- "isClient": true
+ "isClient": true,
+ "unlinkUNIX": false
},
"privateData": 1729
}