Lines Matching refs:server

35 ncp_get_fs_info(struct ncp_server * server, struct inode *inode,  in ncp_get_fs_info()  argument
48 SET_UID(info.mounted_uid, from_kuid_munged(current_user_ns(), server->m.mounted_uid)); in ncp_get_fs_info()
49 info.connection = server->connection; in ncp_get_fs_info()
50 info.buffer_size = server->buffer_size; in ncp_get_fs_info()
60 ncp_get_fs_info_v2(struct ncp_server * server, struct inode *inode, in ncp_get_fs_info_v2() argument
72 info2.mounted_uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in ncp_get_fs_info_v2()
73 info2.connection = server->connection; in ncp_get_fs_info_v2()
74 info2.buffer_size = server->buffer_size; in ncp_get_fs_info_v2()
126 ncp_get_compat_fs_info_v2(struct ncp_server * server, struct inode *inode, in ncp_get_compat_fs_info_v2() argument
138 info2.mounted_uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in ncp_get_compat_fs_info_v2()
139 info2.connection = server->connection; in ncp_get_compat_fs_info_v2()
140 info2.buffer_size = server->buffer_size; in ncp_get_compat_fs_info_v2()
160 ncp_set_charsets(struct ncp_server* server, struct ncp_nls_ioctl __user *arg) in ncp_set_charsets() argument
201 mutex_lock(&server->root_setup_lock); in ncp_set_charsets()
202 if (server->root_setuped) { in ncp_set_charsets()
208 NCP_SET_FLAG(server, NCP_FLAG_UTF8); in ncp_set_charsets()
210 NCP_CLR_FLAG(server, NCP_FLAG_UTF8); in ncp_set_charsets()
211 oldset_cp = server->nls_vol; in ncp_set_charsets()
212 server->nls_vol = codepage; in ncp_set_charsets()
213 oldset_io = server->nls_io; in ncp_set_charsets()
214 server->nls_io = iocharset; in ncp_set_charsets()
217 mutex_unlock(&server->root_setup_lock); in ncp_set_charsets()
225 ncp_get_charsets(struct ncp_server* server, struct ncp_nls_ioctl __user *arg) in ncp_get_charsets() argument
231 mutex_lock(&server->root_setup_lock); in ncp_get_charsets()
232 if (server->nls_vol && server->nls_vol->charset) { in ncp_get_charsets()
233 len = strlen(server->nls_vol->charset); in ncp_get_charsets()
236 strncpy(user.codepage, server->nls_vol->charset, len); in ncp_get_charsets()
240 if (NCP_IS_FLAG(server, NCP_FLAG_UTF8)) in ncp_get_charsets()
242 else if (server->nls_io && server->nls_io->charset) { in ncp_get_charsets()
243 len = strlen(server->nls_io->charset); in ncp_get_charsets()
246 strncpy(user.iocharset, server->nls_io->charset, len); in ncp_get_charsets()
249 mutex_unlock(&server->root_setup_lock); in ncp_get_charsets()
259 struct ncp_server *server = NCP_SERVER(inode); in __ncp_ioctl() local
295 ncp_lock_server(server); in __ncp_ioctl()
300 server->has_subfunction = 0; in __ncp_ioctl()
301 server->current_size = request.size; in __ncp_ioctl()
302 memcpy(server->packet, bouncebuffer, request.size); in __ncp_ioctl()
304 result = ncp_request2(server, request.function, in __ncp_ioctl()
309 result = server->reply_size; in __ncp_ioctl()
310 ncp_unlock_server(server); in __ncp_ioctl()
320 if (!(server->m.int_flags & NCP_IMOUNT_LOGGEDIN_POSSIBLE)) in __ncp_ioctl()
322 mutex_lock(&server->root_setup_lock); in __ncp_ioctl()
323 if (server->root_setuped) in __ncp_ioctl()
328 server->root_setuped = 1; in __ncp_ioctl()
330 mutex_unlock(&server->root_setup_lock); in __ncp_ioctl()
334 return ncp_get_fs_info(server, inode, argp); in __ncp_ioctl()
337 return ncp_get_fs_info_v2(server, inode, argp); in __ncp_ioctl()
341 return ncp_get_compat_fs_info_v2(server, inode, argp); in __ncp_ioctl()
350 SET_UID(uid, from_kuid_munged(current_user_ns(), server->m.mounted_uid)); in __ncp_ioctl()
357 uid_t uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in __ncp_ioctl()
364 uid_t uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in __ncp_ioctl()
374 mutex_lock(&server->root_setup_lock); in __ncp_ioctl()
375 if (server->m.mounted_vol[0]) { in __ncp_ioctl()
384 sr.namespace = server->name_space[sr.volNumber]; in __ncp_ioctl()
396 mutex_unlock(&server->root_setup_lock); in __ncp_ioctl()
412 mutex_lock(&server->root_setup_lock); in __ncp_ioctl()
413 if (server->root_setuped) in __ncp_ioctl()
417 server->m.mounted_vol[0] = 0; in __ncp_ioctl()
424 } else if (ncp_mount_subdir(server, sr.volNumber, in __ncp_ioctl()
440 server->root_setuped = 1; in __ncp_ioctl()
451 mutex_unlock(&server->root_setup_lock); in __ncp_ioctl()
464 ncp_lock_server(server); in __ncp_ioctl()
465 mutex_lock(&server->rcv.creq_mutex); in __ncp_ioctl()
467 if (server->sign_wanted) { in __ncp_ioctl()
468 memcpy(server->sign_root,sign.sign_root,8); in __ncp_ioctl()
469 memcpy(server->sign_last,sign.sign_last,16); in __ncp_ioctl()
470 server->sign_active = 1; in __ncp_ioctl()
474 server->sign_active = 0; in __ncp_ioctl()
476 mutex_unlock(&server->rcv.creq_mutex); in __ncp_ioctl()
477 ncp_unlock_server(server); in __ncp_ioctl()
485 ncp_lock_server(server); in __ncp_ioctl()
486 state = server->sign_wanted; in __ncp_ioctl()
487 ncp_unlock_server(server); in __ncp_ioctl()
501 ncp_lock_server(server); in __ncp_ioctl()
502 if (server->sign_active) { in __ncp_ioctl()
507 server->sign_wanted = newstate != 0; in __ncp_ioctl()
509 ncp_unlock_server(server); in __ncp_ioctl()
590 down_read(&server->auth_rwsem); in __ncp_ioctl()
591 user.auth_type = server->auth.auth_type; in __ncp_ioctl()
593 user.object_name_len = server->auth.object_name_len; in __ncp_ioctl()
599 server->auth.object_name, in __ncp_ioctl()
603 up_read(&server->auth_rwsem); in __ncp_ioctl()
617 down_read(&server->auth_rwsem); in __ncp_ioctl()
618 user.auth_type = server->auth.auth_type; in __ncp_ioctl()
620 user.object_name_len = server->auth.object_name_len; in __ncp_ioctl()
626 server->auth.object_name, in __ncp_ioctl()
630 up_read(&server->auth_rwsem); in __ncp_ioctl()
671 down_write(&server->auth_rwsem); in __ncp_ioctl()
672 oldname = server->auth.object_name; in __ncp_ioctl()
673 oldnamelen = server->auth.object_name_len; in __ncp_ioctl()
674 oldprivate = server->priv.data; in __ncp_ioctl()
675 oldprivatelen = server->priv.len; in __ncp_ioctl()
676 server->auth.auth_type = user.auth_type; in __ncp_ioctl()
677 server->auth.object_name_len = user.object_name_len; in __ncp_ioctl()
678 server->auth.object_name = newname; in __ncp_ioctl()
679 server->priv.len = 0; in __ncp_ioctl()
680 server->priv.data = NULL; in __ncp_ioctl()
681 up_write(&server->auth_rwsem); in __ncp_ioctl()
707 down_read(&server->auth_rwsem); in __ncp_ioctl()
709 user.len = server->priv.len; in __ncp_ioctl()
714 server->priv.data, in __ncp_ioctl()
718 up_read(&server->auth_rwsem); in __ncp_ioctl()
767 down_write(&server->auth_rwsem); in __ncp_ioctl()
768 old = server->priv.data; in __ncp_ioctl()
769 oldlen = server->priv.len; in __ncp_ioctl()
770 server->priv.len = user.len; in __ncp_ioctl()
771 server->priv.data = new; in __ncp_ioctl()
772 up_write(&server->auth_rwsem); in __ncp_ioctl()
779 return ncp_set_charsets(server, argp); in __ncp_ioctl()
782 return ncp_get_charsets(server, argp); in __ncp_ioctl()
796 atomic_set(&server->dentry_ttl, user); in __ncp_ioctl()
802 u_int32_t user = (atomic_read(&server->dentry_ttl) * 1000) / HZ; in __ncp_ioctl()
815 struct ncp_server *server = NCP_SERVER(inode); in ncp_ioctl() local
830 if (!uid_eq(server->m.mounted_uid, uid)) { in ncp_ioctl()