|
442 | 442 | The <replaceable>ATTRIBUTE</replaceable> is the one as |
443 | 443 | used in <acronym>RFC</acronym> 2307 (e.g. <literal>userPassword</literal>, |
444 | 444 | <literal>ipProtocolNumber</literal>, <literal>macAddress</literal>, etc.). |
445 | | - The <replaceable>NEWATTRIBUTE</replaceable> may be any attribute |
| 445 | + </para> |
| 446 | + <para> |
| 447 | + The <replaceable>NEWATTRIBUTE</replaceable> may be the name of any attribute |
446 | 448 | as it is available in the directory. |
447 | 449 | </para> |
448 | 450 | <para> |
449 | | - If the <replaceable>NEWATTRIBUTE</replaceable> is presented in |
450 | | - quotes (") it is treated as an expression which will be evaluated |
| 451 | + If the <replaceable>NEWATTRIBUTE</replaceable> is quoted (") |
| 452 | + as <replaceable>"EXPRESSION"</replaceable> |
| 453 | + it is treated as an expression which will be evaluated |
451 | 454 | to build up the actual value used. |
452 | 455 | See the section on attribute mapping expressions below for more details. |
453 | 456 | </para> |
|
1118 | 1121 | </para> |
1119 | 1122 | <variablelist remap="TP"> |
1120 | 1123 | <varlistentry> |
1121 | | - <term><literal>${attr}</literal> (or <literal>$attr</literal> for short)</term> |
| 1124 | + <term><literal>"${attr}"</literal> (or <literal>"$attr"</literal> for short)</term> |
1122 | 1125 | <listitem><para> |
1123 | 1126 | will substitute the value of the attribute |
1124 | 1127 | </para></listitem> |
1125 | 1128 | </varlistentry> |
1126 | 1129 | <varlistentry> |
1127 | | - <term><literal>${attr:-word}</literal></term> |
| 1130 | + <term><literal>"${attr:-word}"</literal></term> |
1128 | 1131 | <listitem><para> |
1129 | 1132 | (use default) will substitute the value of the attribute or, if the |
1130 | 1133 | attribute is not set or empty substitute the word |
1131 | 1134 | </para></listitem> |
1132 | 1135 | </varlistentry> |
1133 | 1136 | <varlistentry> |
1134 | | - <term><literal>${attr:+word}</literal></term> |
| 1137 | + <term><literal>"${attr:+word}"</literal></term> |
1135 | 1138 | <listitem><para> |
1136 | 1139 | (use alternative) will substitute <literal>word</literal> if attribute |
1137 | 1140 | is set, otherwise substitute the empty string |
1138 | 1141 | </para></listitem> |
1139 | 1142 | </varlistentry> |
1140 | 1143 | <varlistentry> <!-- since 0.9.7 --> |
1141 | | - <term><literal>${attr:offset:length}</literal></term> |
| 1144 | + <term><literal>"${attr:offset:length}"</literal></term> |
1142 | 1145 | <listitem><para> |
1143 | 1146 | will substitute <literal>length</literal> characters (actually |
1144 | 1147 | bytes) starting from position <literal>offset</literal> (which |
|
1149 | 1152 | </para></listitem> |
1150 | 1153 | </varlistentry> |
1151 | 1154 | <varlistentry> <!-- since 0.9.0 --> |
1152 | | - <term><literal>${attr#word}</literal></term> |
| 1155 | + <term><literal>"${attr#word}"</literal></term> |
1153 | 1156 | <listitem><para> |
1154 | 1157 | remove the shortest possible match of <literal>word</literal> from the |
1155 | 1158 | left of the attribute value |
1156 | 1159 | </para></listitem> |
1157 | 1160 | </varlistentry> |
1158 | 1161 | <varlistentry> <!-- since 0.9.0 (pynslcd only) --> |
1159 | | - <term><literal>${attr##word}</literal></term> |
| 1162 | + <term><literal>"${attr##word}"</literal></term> |
1160 | 1163 | <listitem><para> |
1161 | 1164 | remove the longest possible match of <literal>word</literal> from the |
1162 | 1165 | left of the attribute value (<command>pynslcd</command> only) |
1163 | 1166 | </para></listitem> |
1164 | 1167 | </varlistentry> |
1165 | 1168 | <varlistentry> <!-- since 0.9.0 (pynslcd only) --> |
1166 | | - <term><literal>${attr%word}</literal></term> |
| 1169 | + <term><literal>"${attr%word}"</literal></term> |
1167 | 1170 | <listitem><para> |
1168 | 1171 | remove the shortest possible match of <literal>word</literal> from the |
1169 | 1172 | right of the attribute value (<command>pynslcd</command> only) |
1170 | 1173 | </para></listitem> |
1171 | 1174 | </varlistentry> |
1172 | 1175 | <varlistentry> <!-- since 0.9.0 (pynslcd only) --> |
1173 | | - <term><literal>${attr%%word}</literal></term> |
| 1176 | + <term><literal>"${attr%%word}"</literal></term> |
1174 | 1177 | <listitem><para> |
1175 | 1178 | remove the longest possible match of <literal>word</literal> from the |
1176 | 1179 | right of the attribute value (<command>pynslcd</command> only) |
|
1195 | 1198 | </para> |
1196 | 1199 | <variablelist remap="TP"> |
1197 | 1200 | <varlistentry> |
1198 | | - <term><literal>"${shadowFlag:-0}"</literal></term> |
| 1201 | + <term><literal>map shadow shadowFlag "${shadowFlag:-0}"</literal></term> |
1199 | 1202 | <listitem><para> |
1200 | 1203 | use the <literal>shadowFlag</literal> attribute, using the |
1201 | 1204 | value 0 as default |
1202 | 1205 | </para></listitem> |
1203 | 1206 | </varlistentry> |
1204 | 1207 | <varlistentry> |
1205 | | - <term><literal>"${homeDirectory:-/home/$uid}"</literal></term> |
| 1208 | + <term><literal>map passd homeDirectory "${homeDirectory:-/home/$uid}"</literal></term> |
1206 | 1209 | <listitem><para> |
1207 | 1210 | use the <literal>uid</literal> attribute to build a |
1208 | 1211 | <literal>homeDirectory</literal> value if that attribute is missing |
1209 | 1212 | </para></listitem> |
1210 | 1213 | </varlistentry> |
1211 | 1214 | <varlistentry> |
1212 | | - <term><literal>"${isDisabled:+100}"</literal></term> |
| 1215 | + <term><literal>map shadow shadowExpire "${isDisabled:+100}"</literal></term> |
1213 | 1216 | <listitem><para> |
1214 | 1217 | if the <literal>isDisabled</literal> attribute is set, return 100, |
1215 | 1218 | otherwise leave value empty |
1216 | 1219 | </para></listitem> |
1217 | 1220 | </varlistentry> |
1218 | 1221 | <varlistentry> |
1219 | | - <term><literal>"${userPassword#{crypt\}}"</literal></term> |
| 1222 | + <term><literal>map shadow userPassword "${userPassword#{crypt\}}"</literal></term> |
1220 | 1223 | <listitem><para> |
1221 | 1224 | strip the {crypt} prefix from the userPassword attribute, returning |
1222 | 1225 | the raw hash value |
|
0 commit comments