{
char *p, *s;
fstring pidstr;
+ struct passwd *pass;
for (s=str; (p=strchr_m(s, '%'));s=p) {
fstring tmp_str;
strlower(tmp_str);
string_sub(p,"%U",tmp_str,l);
break;
+ case 'G' :
+ if ((pass = Get_Pwnam(current_user_info.smb_name, False))!=NULL) {
+ string_sub(p,"%G",gidtoname(pass->pw_gid),l);
+ } else {
+ p += 2;
+ }
+ break;
case 'D' :
fstrcpy(tmp_str, current_user_info.domain);
strupper(tmp_str);
int l = sizeof(pstring) - (int)(p-str);
switch (*(p+1)) {
- case 'G' :
- if ((pass = Get_Pwnam(user,False))!=NULL) {
- string_sub(p,"%G",gidtoname(pass->pw_gid),l);
- } else {
- p += 2;
- }
- break;
case 'N' : string_sub(p,"%N", automount_server(user),l); break;
case 'H':
if ((home = get_user_home_dir(user))) {