cifs.idmap: clean up strget and avoid memory allocation
[jlayton/cifs-utils.git] / cifs.idmap.8.in
1 '\" t
2 .\"     Title: cifs.idmap
3 .\"    Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 05/26/2011
6 .\"    Manual: System Administration tools
7 .\"    Source: cifs-utils 4.0
8 .\"  Language: English
9 .\"
10 .TH "CIFS\&.IDMAP" "8" "05/26/2011" "cifs-utils" "System Administration tools"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 cifs.idmap \- Userspace helper for mapping ids for Common Internet File System (CIFS)
23 .SH "SYNOPSIS"
24 .HP \w'\ 'u
25 cifs\&.idmap [\-\-version|\-v] {keyid}
26 .SH "DESCRIPTION"
27 .PP
28 This tool is part of the cifs-utils suite\&.
29 .PP
30 cifs\&.idmap is a userspace helper program for the linux CIFS client filesystem\&. There are a number of activities that the kernel cannot easily do itself\&. This program is a callout program that does these things for the kernel and then returns the result\&.
31 .PP
32 cifs\&.idmap is generally intended to be run when the kernel calls request\-key(8)
33 for a particular key type\&. While it can be run directly from the command\-line, it is not generally intended to be run that way\&.
34 .PP
35 cifs\&.idmap works in conjuction with winbind facility of Samba suite to map owner and group SIDs to uids and gids respectively\&.  It is best utilized when
36 .br
37 \t\- a mount option of cifsacl is specified when mounting a cifs share
38 .br
39 \t\- winbind is specified as one of the search entries for passwd and group databases in file /etc/nsswitch\&.conf
40 .br
41 \t\- file smb.conf has winbind specific entries
42 .br
43 \t\- winbind daemon program is running
44 .br
45 .sp
46 In case winbind and cifs.idmap facilities are unavailable, file objects in a mounted share are assigned uid and gid of the credentials of the process that mounted the share\&. So it is strongly recomemended to use mount options of uid and gid to specify a default uid and gid to map owner SIDs and group SIDs respectively in case services of winbind and cifs.idmap facility are unavailable\&.
47 .SH "OPTIONS"
48 .PP
49 \-\-version|\-v
50 .RS 4
51 Print version number and exit\&.
52 .RE
53 .SH "CONFIGURATION FOR KEYCTL"
54 .PP
55 cifs\&.idmap is designed to be called from the kernel via the request\-key callout program\&. This requires that request\-key be told where and how to call this program\&. Currently cifs\&.idmap handles a key type of:
56 .PP
57 cifs\&.idmap
58 .RS 4
59 This keytype is for mapping a SID to either an uid or a gid
60 .RE
61 .PP
62 To make this program useful for CIFS, you will need to set up entry for it in request\-key\&.conf(5)\&. Here is an example of an entry for this key type:
63 .sp
64 .if n \{\
65 .RS 4
66 .\}
67 .nf
68 #OPERATION  TYPE           D C PROGRAM ARG1 ARG2\&.\&.\&.
69 #=========  =============  = = ================================
70 create      cifs\&.idmap     * * @sbindir@/cifs\&.idmap %k
71 .fi
72 .if n \{\
73 .RE
74 .\}
75 .PP
76 See
77 \fBrequest-key.conf\fR(5)
78 for more info on each field\&.
79 .SH "NOTES"
80 .PP
81 Support for upcalls to cifs.idmap was initially introduced in the 3.0 kernel.
82 .SH "SEE ALSO"
83 .PP
84
85 \fBrequest-key.conf\fR(5),
86 \fBmount.cifs\fR(8)
87 .SH "AUTHOR"
88 .PP
89 Shirish Pargaonkar wrote the cifs\&.idmap program\&.
90 .PP
91 The
92 Linux CIFS Mailing list
93 is the preferred place to ask questions regarding these programs\&.