Hi Jonathan,
On 12.09.2017 10:01, Jonathan Doron wrote:
+static struct security_descriptor *pipe_client_get_sd( struct object *obj ) +{
- struct pipe_client *client = (struct pipe_client *) obj;
- if (client->server)
return default_get_sd((struct object *)client->server);
- return default_get_sd(obj);
+}
+static int pipe_client_set_sd( struct object *obj, const struct security_descriptor *sd,
unsigned int set_info )
+{
- struct pipe_client *client = (struct pipe_client *) obj;
- if (client->server)
return default_set_sd((struct object *)client->server, sd, set_info);
- return default_set_sd(obj, sd, set_info);
+}
This looks suspicious to me, it will require more tests. Your tests from the other patch don't really show that we should use the same security descriptor. For example, we could just copy server security descriptor when creating pipe client (and have separated copies later) and it would pass tests as well. It would be interesting add a test that modifies server's security descriptor after client is created and see what happens to client.
As for this approach, there are some problems with corner cases like what happens to client's security descriptor when server is destroyed.
Thanks,
Jacek