ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / fs / ncpfs / ioctl.c
1 /*
2  *  ioctl.c
3  *
4  *  Copyright (C) 1995, 1996 by Volker Lendecke
5  *  Modified 1997 Peter Waltenberg, Bill Hawes, David Woodhouse for 2.1 dcache
6  *  Modified 1998, 1999 Wolfram Pienkoss for NLS
7  *
8  */
9
10 #include <linux/config.h>
11
12 #include <asm/uaccess.h>
13 #include <linux/errno.h>
14 #include <linux/fs.h>
15 #include <linux/ioctl.h>
16 #include <linux/time.h>
17 #include <linux/mm.h>
18 #include <linux/highuid.h>
19 #include <linux/vmalloc.h>
20
21 #include <linux/ncp_fs.h>
22
23 #include "ncplib_kernel.h"
24
25 /* maximum limit for ncp_objectname_ioctl */
26 #define NCP_OBJECT_NAME_MAX_LEN 4096
27 /* maximum limit for ncp_privatedata_ioctl */
28 #define NCP_PRIVATE_DATA_MAX_LEN 8192
29 /* maximum negotiable packet size */
30 #define NCP_PACKET_SIZE_INTERNAL 65536
31
32 int ncp_ioctl(struct inode *inode, struct file *filp,
33               unsigned int cmd, unsigned long arg)
34 {
35         struct ncp_server *server = NCP_SERVER(inode);
36         int result;
37         struct ncp_ioctl_request request;
38         char* bouncebuffer;
39
40         switch (cmd) {
41         case NCP_IOC_NCPREQUEST:
42
43                 if ((permission(inode, MAY_WRITE, NULL) != 0)
44                     && (current->uid != server->m.mounted_uid)) {
45                         return -EACCES;
46                 }
47                 if (copy_from_user(&request, (struct ncp_ioctl_request *) arg,
48                                sizeof(request)))
49                         return -EFAULT;
50
51                 if ((request.function > 255)
52                     || (request.size >
53                   NCP_PACKET_SIZE - sizeof(struct ncp_request_header))) {
54                         return -EINVAL;
55                 }
56                 bouncebuffer = vmalloc(NCP_PACKET_SIZE_INTERNAL);
57                 if (!bouncebuffer)
58                         return -ENOMEM;
59                 if (copy_from_user(bouncebuffer, request.data, request.size)) {
60                         vfree(bouncebuffer);
61                         return -EFAULT;
62                 }
63                 ncp_lock_server(server);
64
65                 /* FIXME: We hack around in the server's structures
66                    here to be able to use ncp_request */
67
68                 server->has_subfunction = 0;
69                 server->current_size = request.size;
70                 memcpy(server->packet, bouncebuffer, request.size);
71
72                 result = ncp_request2(server, request.function, 
73                         bouncebuffer, NCP_PACKET_SIZE_INTERNAL);
74                 if (result < 0)
75                         result = -EIO;
76                 else
77                         result = server->reply_size;
78                 ncp_unlock_server(server);
79                 DPRINTK("ncp_ioctl: copy %d bytes\n",
80                         result);
81                 if (result >= 0)
82                         if (copy_to_user(request.data, bouncebuffer, result))
83                                 result = -EFAULT;
84                 vfree(bouncebuffer);
85                 return result;
86
87         case NCP_IOC_CONN_LOGGED_IN:
88
89                 if (!capable(CAP_SYS_ADMIN))
90                         return -EACCES;
91                 if (!(server->m.int_flags & NCP_IMOUNT_LOGGEDIN_POSSIBLE))
92                         return -EINVAL;
93                 if (server->root_setuped)
94                         return -EBUSY;
95                 server->root_setuped = 1;
96                 return ncp_conn_logged_in(inode->i_sb);
97
98         case NCP_IOC_GET_FS_INFO:
99                 {
100                         struct ncp_fs_info info;
101
102                         if ((permission(inode, MAY_WRITE, NULL) != 0)
103                             && (current->uid != server->m.mounted_uid)) {
104                                 return -EACCES;
105                         }
106                         if (copy_from_user(&info, (struct ncp_fs_info *) arg, 
107                                 sizeof(info)))
108                                 return -EFAULT;
109
110                         if (info.version != NCP_GET_FS_INFO_VERSION) {
111                                 DPRINTK("info.version invalid: %d\n", info.version);
112                                 return -EINVAL;
113                         }
114                         /* TODO: info.addr = server->m.serv_addr; */
115                         SET_UID(info.mounted_uid, server->m.mounted_uid);
116                         info.connection         = server->connection;
117                         info.buffer_size        = server->buffer_size;
118                         info.volume_number      = NCP_FINFO(inode)->volNumber;
119                         info.directory_id       = NCP_FINFO(inode)->DosDirNum;
120
121                         if (copy_to_user((struct ncp_fs_info *) arg, &info, 
122                                 sizeof(info))) return -EFAULT;
123                         return 0;
124                 }
125
126         case NCP_IOC_GET_FS_INFO_V2:
127                 {
128                         struct ncp_fs_info_v2 info2;
129
130                         if ((permission(inode, MAY_WRITE, NULL) != 0)
131                             && (current->uid != server->m.mounted_uid)) {
132                                 return -EACCES;
133                         }
134                         if (copy_from_user(&info2, (struct ncp_fs_info_v2 *) arg, 
135                                 sizeof(info2)))
136                                 return -EFAULT;
137
138                         if (info2.version != NCP_GET_FS_INFO_VERSION_V2) {
139                                 DPRINTK("info.version invalid: %d\n", info2.version);
140                                 return -EINVAL;
141                         }
142                         info2.mounted_uid   = server->m.mounted_uid;
143                         info2.connection    = server->connection;
144                         info2.buffer_size   = server->buffer_size;
145                         info2.volume_number = NCP_FINFO(inode)->volNumber;
146                         info2.directory_id  = NCP_FINFO(inode)->DosDirNum;
147                         info2.dummy1 = info2.dummy2 = info2.dummy3 = 0;
148
149                         if (copy_to_user((struct ncp_fs_info_v2 *) arg, &info2, 
150                                 sizeof(info2))) return -EFAULT;
151                         return 0;
152                 }
153
154         case NCP_IOC_GETMOUNTUID2:
155                 {
156                         unsigned long tmp = server->m.mounted_uid;
157
158                         if (   (permission(inode, MAY_READ, NULL) != 0)
159                             && (current->uid != server->m.mounted_uid))
160                         {
161                                 return -EACCES;
162                         }
163                         if (put_user(tmp, (unsigned long*) arg)) 
164                                 return -EFAULT;
165                         return 0;
166                 }
167
168         case NCP_IOC_GETROOT:
169                 {
170                         struct ncp_setroot_ioctl sr;
171
172                         if (   (permission(inode, MAY_READ, NULL) != 0)
173                             && (current->uid != server->m.mounted_uid))
174                         {
175                                 return -EACCES;
176                         }
177                         if (server->m.mounted_vol[0]) {
178                                 struct dentry* dentry = inode->i_sb->s_root;
179
180                                 if (dentry) {
181                                         struct inode* inode = dentry->d_inode;
182                                 
183                                         if (inode) {
184                                                 sr.volNumber = NCP_FINFO(inode)->volNumber;
185                                                 sr.dirEntNum = NCP_FINFO(inode)->dirEntNum;
186                                                 sr.namespace = server->name_space[sr.volNumber];
187                                         } else
188                                                 DPRINTK("ncpfs: s_root->d_inode==NULL\n");
189                                 } else
190                                         DPRINTK("ncpfs: s_root==NULL\n");
191                         } else {
192                                 sr.volNumber = -1;
193                                 sr.namespace = 0;
194                                 sr.dirEntNum = 0;
195                         }
196                         if (copy_to_user((struct ncp_setroot_ioctl*)arg, 
197                                           &sr, 
198                                           sizeof(sr))) return -EFAULT;
199                         return 0;
200                 }
201         case NCP_IOC_SETROOT:
202                 {
203                         struct ncp_setroot_ioctl sr;
204                         unsigned int vnum, de, dosde;
205                         struct dentry* dentry;
206
207                         if (!capable(CAP_SYS_ADMIN))
208                         {
209                                 return -EACCES;
210                         }
211                         if (server->root_setuped) return -EBUSY;
212                         if (copy_from_user(&sr,
213                                            (struct ncp_setroot_ioctl*)arg, 
214                                            sizeof(sr))) return -EFAULT;
215                         if (sr.volNumber < 0) {
216                                 server->m.mounted_vol[0] = 0;
217                                 vnum = NCP_NUMBER_OF_VOLUMES;
218                                 de = 0;
219                                 dosde = 0;
220                         } else if (sr.volNumber >= NCP_NUMBER_OF_VOLUMES) {
221                                 return -EINVAL;
222                         } else {
223                                 struct nw_info_struct ni;
224                                 
225                                 if (ncp_mount_subdir(server, &ni, sr.volNumber,
226                                                 sr.namespace, sr.dirEntNum))
227                                         return -ENOENT;
228                                 vnum = ni.volNumber;
229                                 de = ni.dirEntNum;
230                                 dosde = ni.DosDirNum;
231                         }
232                         
233                         dentry = inode->i_sb->s_root;
234                         server->root_setuped = 1;
235                         if (dentry) {
236                                 struct inode* inode = dentry->d_inode;
237                                 
238                                 if (inode) {
239                                         NCP_FINFO(inode)->volNumber = vnum;
240                                         NCP_FINFO(inode)->dirEntNum = de;
241                                         NCP_FINFO(inode)->DosDirNum = dosde;
242                                 } else
243                                         DPRINTK("ncpfs: s_root->d_inode==NULL\n");
244                         } else
245                                 DPRINTK("ncpfs: s_root==NULL\n");
246
247                         return 0;
248                 }
249
250 #ifdef CONFIG_NCPFS_PACKET_SIGNING      
251         case NCP_IOC_SIGN_INIT:
252                 if ((permission(inode, MAY_WRITE, NULL) != 0)
253                     && (current->uid != server->m.mounted_uid))
254                 {
255                         return -EACCES;
256                 }
257                 if (arg) {
258                         if (server->sign_wanted)
259                         {
260                                 struct ncp_sign_init sign;
261
262                                 if (copy_from_user(&sign, (struct ncp_sign_init *) arg,
263                                       sizeof(sign))) return -EFAULT;
264                                 memcpy(server->sign_root,sign.sign_root,8);
265                                 memcpy(server->sign_last,sign.sign_last,16);
266                                 server->sign_active = 1;
267                         }
268                         /* ignore when signatures not wanted */
269                 } else {
270                         server->sign_active = 0;
271                 }
272                 return 0;               
273                 
274         case NCP_IOC_SIGN_WANTED:
275                 if (   (permission(inode, MAY_READ, NULL) != 0)
276                     && (current->uid != server->m.mounted_uid))
277                 {
278                         return -EACCES;
279                 }
280                 
281                 if (put_user(server->sign_wanted, (int*) arg))
282                         return -EFAULT;
283                 return 0;
284         case NCP_IOC_SET_SIGN_WANTED:
285                 {
286                         int newstate;
287
288                         if (   (permission(inode, MAY_WRITE, NULL) != 0)
289                             && (current->uid != server->m.mounted_uid))
290                         {
291                                 return -EACCES;
292                         }
293                         /* get only low 8 bits... */
294                         if (get_user(newstate, (unsigned char *) arg))
295                                 return -EFAULT;
296                         if (server->sign_active) {
297                                 /* cannot turn signatures OFF when active */
298                                 if (!newstate) return -EINVAL;
299                         } else {
300                                 server->sign_wanted = newstate != 0;
301                         }
302                         return 0;
303                 }
304
305 #endif /* CONFIG_NCPFS_PACKET_SIGNING */
306
307 #ifdef CONFIG_NCPFS_IOCTL_LOCKING
308         case NCP_IOC_LOCKUNLOCK:
309                 if (   (permission(inode, MAY_WRITE, NULL) != 0)
310                     && (current->uid != server->m.mounted_uid))
311                 {
312                         return -EACCES;
313                 }
314                 {
315                         struct ncp_lock_ioctl    rqdata;
316                         int result;
317
318                         if (copy_from_user(&rqdata, (struct ncp_lock_ioctl*)arg,
319                                 sizeof(rqdata))) return -EFAULT;
320                         if (rqdata.origin != 0)
321                                 return -EINVAL;
322                         /* check for cmd */
323                         switch (rqdata.cmd) {
324                                 case NCP_LOCK_EX:
325                                 case NCP_LOCK_SH:
326                                                 if (rqdata.timeout == 0)
327                                                         rqdata.timeout = NCP_LOCK_DEFAULT_TIMEOUT;
328                                                 else if (rqdata.timeout > NCP_LOCK_MAX_TIMEOUT)
329                                                         rqdata.timeout = NCP_LOCK_MAX_TIMEOUT;
330                                                 break;
331                                 case NCP_LOCK_LOG:
332                                                 rqdata.timeout = NCP_LOCK_DEFAULT_TIMEOUT;      /* has no effect */
333                                 case NCP_LOCK_CLEAR:
334                                                 break;
335                                 default:
336                                                 return -EINVAL;
337                         }
338                         /* locking needs both read and write access */
339                         if ((result = ncp_make_open(inode, O_RDWR)) != 0)
340                         {
341                                 return result;
342                         }
343                         result = -EIO;
344                         if (!ncp_conn_valid(server))
345                                 goto outrel;
346                         result = -EISDIR;
347                         if (!S_ISREG(inode->i_mode))
348                                 goto outrel;
349                         if (rqdata.cmd == NCP_LOCK_CLEAR)
350                         {
351                                 result = ncp_ClearPhysicalRecord(NCP_SERVER(inode),
352                                                         NCP_FINFO(inode)->file_handle, 
353                                                         rqdata.offset,
354                                                         rqdata.length);
355                                 if (result > 0) result = 0;     /* no such lock */
356                         }
357                         else
358                         {
359                                 int lockcmd;
360
361                                 switch (rqdata.cmd)
362                                 {
363                                         case NCP_LOCK_EX:  lockcmd=1; break;
364                                         case NCP_LOCK_SH:  lockcmd=3; break;
365                                         default:           lockcmd=0; break;
366                                 }
367                                 result = ncp_LogPhysicalRecord(NCP_SERVER(inode),
368                                                         NCP_FINFO(inode)->file_handle,
369                                                         lockcmd,
370                                                         rqdata.offset,
371                                                         rqdata.length,
372                                                         rqdata.timeout);
373                                 if (result > 0) result = -EAGAIN;
374                         }
375 outrel:                 
376                         ncp_inode_close(inode);
377                         return result;
378                 }
379 #endif  /* CONFIG_NCPFS_IOCTL_LOCKING */
380
381         case NCP_IOC_GETOBJECTNAME:
382                 if (current->uid != server->m.mounted_uid) {
383                         return -EACCES;
384                 }
385                 {
386                         struct ncp_objectname_ioctl user;
387                         size_t outl;
388
389                         if (copy_from_user(&user, 
390                                            (struct ncp_objectname_ioctl*)arg,
391                                            sizeof(user))) return -EFAULT;
392                         user.auth_type = server->auth.auth_type;
393                         outl = user.object_name_len;
394                         user.object_name_len = server->auth.object_name_len;
395                         if (outl > user.object_name_len)
396                                 outl = user.object_name_len;
397                         if (outl) {
398                                 if (copy_to_user(user.object_name,
399                                                  server->auth.object_name,
400                                                  outl)) return -EFAULT;
401                         }
402                         if (copy_to_user((struct ncp_objectname_ioctl*)arg,
403                                          &user,
404                                          sizeof(user))) return -EFAULT;
405                         return 0;
406                 }
407         case NCP_IOC_SETOBJECTNAME:
408                 if (current->uid != server->m.mounted_uid) {
409                         return -EACCES;
410                 }
411                 {
412                         struct ncp_objectname_ioctl user;
413                         void* newname;
414                         void* oldname;
415                         size_t oldnamelen;
416                         void* oldprivate;
417                         size_t oldprivatelen;
418
419                         if (copy_from_user(&user, 
420                                            (struct ncp_objectname_ioctl*)arg,
421                                            sizeof(user))) return -EFAULT;
422                         if (user.object_name_len > NCP_OBJECT_NAME_MAX_LEN)
423                                 return -ENOMEM;
424                         if (user.object_name_len) {
425                                 newname = ncp_kmalloc(user.object_name_len, GFP_USER);
426                                 if (!newname) return -ENOMEM;
427                                 if (copy_from_user(newname, user.object_name, user.object_name_len)) {
428                                         ncp_kfree_s(newname, user.object_name_len);
429                                         return -EFAULT;
430                                 }
431                         } else {
432                                 newname = NULL;
433                         }
434                         /* enter critical section */
435                         /* maybe that kfree can sleep so do that this way */
436                         /* it is at least more SMP friendly (in future...) */
437                         oldname = server->auth.object_name;
438                         oldnamelen = server->auth.object_name_len;
439                         oldprivate = server->priv.data;
440                         oldprivatelen = server->priv.len;
441                         server->auth.auth_type = user.auth_type;
442                         server->auth.object_name_len = user.object_name_len;
443                         server->auth.object_name = newname;
444                         server->priv.len = 0;
445                         server->priv.data = NULL;
446                         /* leave critical section */
447                         if (oldprivate) ncp_kfree_s(oldprivate, oldprivatelen);
448                         if (oldname) ncp_kfree_s(oldname, oldnamelen);
449                         return 0;
450                 }
451         case NCP_IOC_GETPRIVATEDATA:
452                 if (current->uid != server->m.mounted_uid) {
453                         return -EACCES;
454                 }
455                 {
456                         struct ncp_privatedata_ioctl user;
457                         size_t outl;
458
459                         if (copy_from_user(&user, 
460                                            (struct ncp_privatedata_ioctl*)arg,
461                                            sizeof(user))) return -EFAULT;
462                         outl = user.len;
463                         user.len = server->priv.len;
464                         if (outl > user.len) outl = user.len;
465                         if (outl) {
466                                 if (copy_to_user(user.data,
467                                                  server->priv.data,
468                                                  outl)) return -EFAULT;
469                         }
470                         if (copy_to_user((struct ncp_privatedata_ioctl*)arg,
471                                          &user,
472                                          sizeof(user))) return -EFAULT;
473                         return 0;
474                 }
475         case NCP_IOC_SETPRIVATEDATA:
476                 if (current->uid != server->m.mounted_uid) {
477                         return -EACCES;
478                 }
479                 {
480                         struct ncp_privatedata_ioctl user;
481                         void* new;
482                         void* old;
483                         size_t oldlen;
484
485                         if (copy_from_user(&user, 
486                                            (struct ncp_privatedata_ioctl*)arg,
487                                            sizeof(user))) return -EFAULT;
488                         if (user.len > NCP_PRIVATE_DATA_MAX_LEN)
489                                 return -ENOMEM;
490                         if (user.len) {
491                                 new = ncp_kmalloc(user.len, GFP_USER);
492                                 if (!new) return -ENOMEM;
493                                 if (copy_from_user(new, user.data, user.len)) {
494                                         ncp_kfree_s(new, user.len);
495                                         return -EFAULT;
496                                 }
497                         } else {
498                                 new = NULL;
499                         }
500                         /* enter critical section */
501                         old = server->priv.data;
502                         oldlen = server->priv.len;
503                         server->priv.len = user.len;
504                         server->priv.data = new;
505                         /* leave critical section */
506                         if (old) ncp_kfree_s(old, oldlen);
507                         return 0;
508                 }
509
510 #ifdef CONFIG_NCPFS_NLS
511 /* Here we are select the iocharset and the codepage for NLS.
512  * Thanks Petr Vandrovec for idea and many hints.
513  */
514         case NCP_IOC_SETCHARSETS:
515                 if (!capable(CAP_SYS_ADMIN))
516                         return -EACCES;
517                 if (server->root_setuped)
518                         return -EBUSY;
519
520                 {
521                         struct ncp_nls_ioctl user;
522                         struct nls_table *codepage;
523                         struct nls_table *iocharset;
524                         struct nls_table *oldset_io;
525                         struct nls_table *oldset_cp;
526                         
527                         if (copy_from_user(&user, (struct ncp_nls_ioctl*)arg,
528                                         sizeof(user)))
529                                 return -EFAULT;
530
531                         codepage = NULL;
532                         user.codepage[NCP_IOCSNAME_LEN] = 0;
533                         if (!user.codepage[0] ||
534                                         !strcmp(user.codepage, "default"))
535                                 codepage = load_nls_default();
536                         else {
537                                 codepage = load_nls(user.codepage);
538                                 if (!codepage) {
539                                         return -EBADRQC;
540                                 }
541                         }
542
543                         iocharset = NULL;
544                         user.iocharset[NCP_IOCSNAME_LEN] = 0;
545                         if (!user.iocharset[0] ||
546                                         !strcmp(user.iocharset, "default")) {
547                                 iocharset = load_nls_default();
548                                 NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
549                         } else {
550                                 if (!strcmp(user.iocharset, "utf8")) {
551                                         iocharset = load_nls_default();
552                                         NCP_SET_FLAG(server, NCP_FLAG_UTF8);
553                                 } else {
554                                         iocharset = load_nls(user.iocharset);
555                                         if (!iocharset) {
556                                                 unload_nls(codepage);
557                                                 return -EBADRQC;
558                                         }
559                                         NCP_CLR_FLAG(server, NCP_FLAG_UTF8);
560                                 }
561                         }
562
563                         oldset_cp = server->nls_vol;
564                         server->nls_vol = codepage;
565                         oldset_io = server->nls_io;
566                         server->nls_io = iocharset;
567
568                         if (oldset_cp)
569                                 unload_nls(oldset_cp);
570                         if (oldset_io)
571                                 unload_nls(oldset_io);
572
573                         return 0;
574                 }
575                 
576         case NCP_IOC_GETCHARSETS: /* not tested */
577                 {
578                         struct ncp_nls_ioctl user;
579                         int len;
580
581                         memset(&user, 0, sizeof(user));
582                         if (server->nls_vol && server->nls_vol->charset) {
583                                 len = strlen(server->nls_vol->charset);
584                                 if (len > NCP_IOCSNAME_LEN)
585                                         len = NCP_IOCSNAME_LEN;
586                                 strncpy(user.codepage,
587                                                 server->nls_vol->charset, len);
588                                 user.codepage[len] = 0;
589                         }
590
591                         if (NCP_IS_FLAG(server, NCP_FLAG_UTF8))
592                                 strcpy(user.iocharset, "utf8");
593                         else
594                                 if (server->nls_io && server->nls_io->charset) {
595                                         len = strlen(server->nls_io->charset);
596                                         if (len > NCP_IOCSNAME_LEN)
597                                                 len = NCP_IOCSNAME_LEN;
598                                         strncpy(user.iocharset,
599                                                 server->nls_io->charset, len);
600                                         user.iocharset[len] = 0;
601                                 }
602
603                         if (copy_to_user((struct ncp_nls_ioctl*)arg, &user,
604                                         sizeof(user)))
605                                 return -EFAULT;
606
607                         return 0;
608                 }
609 #endif /* CONFIG_NCPFS_NLS */
610         case NCP_IOC_SETDENTRYTTL:
611                 if ((permission(inode, MAY_WRITE, NULL) != 0) &&
612                                  (current->uid != server->m.mounted_uid))
613                         return -EACCES;
614                 {
615                         u_int32_t user;
616
617                         if (copy_from_user(&user, (u_int32_t*)arg, sizeof(user)))
618                                 return -EFAULT;
619                         /* 20 secs at most... */
620                         if (user > 20000)
621                                 return -EINVAL;
622                         user = (user * HZ) / 1000;
623                         server->dentry_ttl = user;
624                         return 0;
625                 }
626                 
627         case NCP_IOC_GETDENTRYTTL:
628                 {
629                         u_int32_t user = (server->dentry_ttl * 1000) / HZ;
630                         if (copy_to_user((u_int32_t*)arg, &user, sizeof(user)))
631                                 return -EFAULT;
632                         return 0;
633                 }
634
635         }
636 /* #ifdef CONFIG_UID16 */
637         /* NCP_IOC_GETMOUNTUID may be same as NCP_IOC_GETMOUNTUID2,
638            so we have this out of switch */
639         if (cmd == NCP_IOC_GETMOUNTUID) {
640                 __kernel_uid_t uid = 0;
641                 if ((permission(inode, MAY_READ, NULL) != 0)
642                     && (current->uid != server->m.mounted_uid)) {
643                         return -EACCES;
644                 }
645                 SET_UID(uid, server->m.mounted_uid);
646                 if (put_user(uid, (__kernel_uid_t *) arg))
647                         return -EFAULT;
648                 return 0;
649         }
650 /* #endif */
651         return -EINVAL;
652 }