Commit f55db788 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Add link_name and unlink_name object operations.

parent f6e740cc
......@@ -65,6 +65,8 @@ static const struct object_ops async_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
async_destroy /* destroy */
......@@ -98,6 +100,8 @@ static const struct object_ops async_queue_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
async_queue_destroy /* destroy */
......
......@@ -87,6 +87,8 @@ static const struct object_ops atom_table_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
atom_table_destroy /* destroy */
......
......@@ -166,6 +166,8 @@ static const struct object_ops dir_ops =
dir_get_sd, /* get_sd */
dir_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
dir_destroy /* destroy */
......
......@@ -65,6 +65,8 @@ static const struct object_ops clipboard_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......
......@@ -72,6 +72,8 @@ static const struct object_ops completion_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
completion_destroy /* destroy */
......
......@@ -84,6 +84,8 @@ static const struct object_ops console_input_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
console_input_destroy /* destroy */
......@@ -116,6 +118,8 @@ static const struct object_ops console_input_events_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
console_input_events_destroy /* destroy */
......@@ -168,6 +172,8 @@ static const struct object_ops screen_buffer_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
screen_buffer_destroy /* destroy */
......
......@@ -81,6 +81,8 @@ static const struct object_ops debug_event_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
debug_event_destroy /* destroy */
......@@ -105,6 +107,8 @@ static const struct object_ops debug_ctx_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
debug_ctx_destroy /* destroy */
......
......@@ -78,6 +78,8 @@ static const struct object_ops irp_call_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
irp_call_destroy /* destroy */
......@@ -112,6 +114,8 @@ static const struct object_ops device_manager_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
device_manager_destroy /* destroy */
......@@ -151,6 +155,8 @@ static const struct object_ops device_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
device_open_file, /* open_file */
no_close_handle, /* close_handle */
device_destroy /* destroy */
......@@ -197,6 +203,8 @@ static const struct object_ops device_file_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
device_file_close_handle, /* close_handle */
device_file_destroy /* destroy */
......
......@@ -64,6 +64,8 @@ static const struct object_ops object_type_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......@@ -97,6 +99,8 @@ static const struct object_ops directory_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
directory_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
directory_destroy /* destroy */
......
......@@ -65,6 +65,8 @@ static const struct object_ops event_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......@@ -96,6 +98,8 @@ static const struct object_ops keyed_event_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......
......@@ -209,6 +209,8 @@ static const struct object_ops fd_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
fd_destroy /* destroy */
......@@ -246,6 +248,8 @@ static const struct object_ops device_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
device_destroy /* destroy */
......@@ -282,6 +286,8 @@ static const struct object_ops inode_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
inode_destroy /* destroy */
......@@ -320,6 +326,8 @@ static const struct object_ops file_lock_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......
......@@ -91,6 +91,8 @@ static const struct object_ops file_ops =
file_get_sd, /* get_sd */
file_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
file_open_file, /* open_file */
fd_close_handle, /* close_handle */
file_destroy /* destroy */
......
......@@ -130,6 +130,8 @@ static const struct object_ops handle_table_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
handle_table_destroy /* destroy */
......
......@@ -88,6 +88,8 @@ static const struct object_ops hook_table_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
hook_table_destroy /* destroy */
......
......@@ -85,6 +85,8 @@ static const struct object_ops mailslot_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
mailslot_open_file, /* open_file */
fd_close_handle, /* close_handle */
mailslot_destroy /* destroy */
......@@ -138,6 +140,8 @@ static const struct object_ops mail_writer_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
mail_writer_destroy /* destroy */
......@@ -192,6 +196,8 @@ static const struct object_ops mailslot_device_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
mailslot_device_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
mailslot_device_open_file, /* open_file */
fd_close_handle, /* close_handle */
mailslot_device_destroy /* destroy */
......
......@@ -91,6 +91,8 @@ static const struct object_ops mapping_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
mapping_destroy /* destroy */
......
......@@ -68,6 +68,8 @@ static const struct object_ops mutex_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
mutex_destroy /* destroy */
......
......@@ -131,6 +131,8 @@ static const struct object_ops named_pipe_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
named_pipe_open_file, /* open_file */
no_close_handle, /* close_handle */
named_pipe_destroy /* destroy */
......@@ -160,6 +162,8 @@ static const struct object_ops pipe_server_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
pipe_server_destroy /* destroy */
......@@ -202,6 +206,8 @@ static const struct object_ops pipe_client_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
pipe_client_destroy /* destroy */
......@@ -248,6 +254,8 @@ static const struct object_ops named_pipe_device_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
named_pipe_device_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
named_pipe_device_open_file, /* open_file */
fd_close_handle, /* close_handle */
named_pipe_device_destroy /* destroy */
......
......@@ -551,6 +551,12 @@ struct object *no_lookup_name( struct object *obj, struct unicode_str *name,
return NULL;
}
int no_link_name( struct object *obj, struct object_name *name, struct object *parent )
{
set_error( STATUS_OBJECT_TYPE_MISMATCH );
return 0;
}
struct object *no_open_file( struct object *obj, unsigned int access, unsigned int sharing,
unsigned int options )
{
......
......@@ -83,6 +83,10 @@ struct object_ops
int (*set_sd)( struct object *, const struct security_descriptor *, unsigned int );
/* lookup a name if an object has a namespace */
struct object *(*lookup_name)(struct object *, struct unicode_str *,unsigned int);
/* link an object's name into a parent object */
int (*link_name)(struct object *, struct object_name *, struct object *);
/* unlink an object's name from its parent */
void (*unlink_name)(struct object *, struct object_name *);
/* open a file object to access this object */
struct object *(*open_file)(struct object *, unsigned int access, unsigned int sharing,
unsigned int options);
......@@ -143,6 +147,7 @@ extern int default_set_sd( struct object *obj, const struct security_descriptor
extern int set_sd_defaults_from_token( struct object *obj, const struct security_descriptor *sd,
unsigned int set_info, struct token *token );
extern struct object *no_lookup_name( struct object *obj, struct unicode_str *name, unsigned int attributes );
extern int no_link_name( struct object *obj, struct object_name *name, struct object *parent );
extern struct object *no_open_file( struct object *obj, unsigned int access, unsigned int sharing,
unsigned int options );
extern int no_close_handle( struct object *obj, struct process *process, obj_handle_t handle );
......
......@@ -81,6 +81,8 @@ static const struct object_ops process_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
process_destroy /* destroy */
......@@ -129,6 +131,8 @@ static const struct object_ops startup_info_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
startup_info_destroy /* destroy */
......@@ -170,6 +174,8 @@ static const struct object_ops job_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
job_close_handle, /* close_handle */
job_destroy /* destroy */
......
......@@ -178,6 +178,8 @@ static const struct object_ops msg_queue_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
msg_queue_destroy /* destroy */
......@@ -211,6 +213,8 @@ static const struct object_ops thread_input_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
thread_input_destroy /* destroy */
......
......@@ -166,6 +166,8 @@ static const struct object_ops key_ops =
key_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
key_close_handle, /* close_handle */
key_destroy /* destroy */
......
......@@ -104,6 +104,8 @@ static const struct object_ops master_socket_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
master_socket_destroy /* destroy */
......
......@@ -65,6 +65,8 @@ static const struct object_ops semaphore_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
no_destroy /* destroy */
......
......@@ -103,6 +103,8 @@ static const struct object_ops serial_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
serial_destroy /* destroy */
......
......@@ -74,6 +74,8 @@ static const struct object_ops handler_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
handler_destroy /* destroy */
......
......@@ -68,6 +68,8 @@ static const struct object_ops snapshot_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
snapshot_destroy /* destroy */
......
......@@ -153,6 +153,8 @@ static const struct object_ops sock_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
fd_close_handle, /* close_handle */
sock_destroy /* destroy */
......@@ -995,6 +997,8 @@ static const struct object_ops ifchange_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
ifchange_destroy /* destroy */
......
......@@ -67,6 +67,8 @@ static const struct object_ops symlink_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
symlink_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
symlink_destroy /* destroy */
......
......@@ -117,6 +117,8 @@ static const struct object_ops thread_apc_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
thread_apc_destroy /* destroy */
......@@ -146,6 +148,8 @@ static const struct object_ops thread_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
destroy_thread /* destroy */
......
......@@ -72,6 +72,8 @@ static const struct object_ops timer_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
timer_destroy /* destroy */
......
......@@ -158,6 +158,8 @@ static const struct object_ops token_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
no_close_handle, /* close_handle */
token_destroy /* destroy */
......
......@@ -69,6 +69,8 @@ static const struct object_ops winstation_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
winstation_close_handle, /* close_handle */
winstation_destroy /* destroy */
......@@ -90,6 +92,8 @@ static const struct object_ops desktop_ops =
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
desktop_close_handle, /* close_handle */
desktop_destroy /* destroy */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment