mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
- use full_name instead of real_name
- got rid of guest map code in lpq parser
This commit is contained in:
parent
89e7199445
commit
8e53f781d3
@ -85,10 +85,6 @@
|
||||
/* this is where browse lists are kept in the lock dir */
|
||||
#define SERVER_LIST "browse.dat"
|
||||
|
||||
/* shall guest entries in printer queues get changed to user entries,
|
||||
so they can be deleted using the windows print manager? */
|
||||
#define LPQ_GUEST_TO_USER
|
||||
|
||||
/* shall filenames with illegal chars in them get mangled in long
|
||||
filename listings? */
|
||||
#define MANGLE_LONG_FILENAMES
|
||||
|
@ -606,7 +606,7 @@ struct dcinfo
|
||||
typedef struct {
|
||||
fstring smb_name; /* user name from the client */
|
||||
fstring unix_name; /* unix user name of a validated user */
|
||||
fstring real_name; /* to store real name from password file - simeon */
|
||||
fstring full_name; /* to store full name (such as "Joe Bloggs") from gecos field of password file */
|
||||
fstring domain; /* domain that the client specified */
|
||||
} userdom_struct;
|
||||
|
||||
|
@ -821,16 +821,6 @@ BOOL parse_lpq_entry(int snum,char *line,
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef LPQ_GUEST_TO_USER
|
||||
if (ret) {
|
||||
extern pstring sesssetup_user;
|
||||
/* change guest entries to the current logged in user to make
|
||||
them appear deletable to windows */
|
||||
if (sesssetup_user[0] && strequal(buf->user,lp_guestaccount(snum)))
|
||||
pstrcpy(buf->user,sesssetup_user);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We don't want the newline in the status message. */
|
||||
{
|
||||
char *p = strchr(line,'\n');
|
||||
|
@ -808,7 +808,7 @@ static BOOL api_net_sam_logon(prs_struct *data, prs_struct *rdata)
|
||||
&dummy_time, /* pass_must_change_time */
|
||||
|
||||
nt_username , /* user_name */
|
||||
vuser->user.real_name, /* full_name */
|
||||
vuser->user.full_name, /* full_name */
|
||||
logon_script , /* logon_script */
|
||||
profile_path , /* profile_path */
|
||||
home_dir , /* home_dir */
|
||||
|
@ -121,7 +121,7 @@ static void attempt_remote_rpc_connect(pipes_struct *p)
|
||||
|
||||
/* set up unix credentials from the smb side, to feed over the pipe */
|
||||
make_creds_unix(&usr.uxc, vuser->user.unix_name, vuser->user.smb_name,
|
||||
vuser->user.real_name, vuser->guest);
|
||||
vuser->user.full_name, vuser->guest);
|
||||
usr.ptr_uxc = 1;
|
||||
make_creds_unix_sec(&usr.uxs, vuser->uid, vuser->gid,
|
||||
vuser->n_groups, vuser->groups);
|
||||
|
@ -1175,3 +1175,5 @@ BOOL api_spoolss_rpc(pipes_struct *p, prs_struct *data)
|
||||
{
|
||||
return api_rpcTNP(p, "api_spoolss_rpc", api_spoolss_cmds, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2336,7 +2336,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
|
||||
|
||||
/* EEK! the cifsrap.txt doesn't have this in!!!! */
|
||||
SIVAL(p,usri11_full_name,PTR_DIFF(p2,p)); /* full name */
|
||||
pstrcpy(p2,((vuser != NULL) ? vuser->user.real_name : UserName));
|
||||
pstrcpy(p2,((vuser != NULL) ? vuser->user.full_name : UserName));
|
||||
p2 = skip_string(p2,1);
|
||||
}
|
||||
|
||||
@ -2395,7 +2395,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
|
||||
{
|
||||
SIVAL(p,60,0); /* auth_flags */
|
||||
SIVAL(p,64,PTR_DIFF(p2,*rdata)); /* full_name */
|
||||
pstrcpy(p2,((vuser != NULL) ? vuser->user.real_name : UserName));
|
||||
pstrcpy(p2,((vuser != NULL) ? vuser->user.full_name : UserName));
|
||||
p2 = skip_string(p2,1);
|
||||
SIVAL(p,68,0); /* urs_comment */
|
||||
SIVAL(p,72,PTR_DIFF(p2,*rdata)); /* parms */
|
||||
|
@ -261,12 +261,12 @@ uint16 register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name,
|
||||
DEBUG(3,("uid %d registered to name %s\n",(int)uid,unix_name));
|
||||
|
||||
DEBUG(3, ("Clearing default real name\n"));
|
||||
fstrcpy(vuser->user.real_name, "<Full Name>");
|
||||
fstrcpy(vuser->user.full_name, "<Full Name>");
|
||||
if (lp_unix_realname()) {
|
||||
if ((pwfile=sys_getpwnam(vuser->user.unix_name))!= NULL)
|
||||
{
|
||||
DEBUG(3, ("User name: %s\tReal name: %s\n",vuser->user.unix_name,pwfile->pw_gecos));
|
||||
fstrcpy(vuser->user.real_name, pwfile->pw_gecos);
|
||||
fstrcpy(vuser->user.full_name, pwfile->pw_gecos);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user