Ignore:
Timestamp:
Sep 30, 2007, 3:42:50 AM (18 years ago)
Author:
Paul Smedley
Message:

Update trunk to 3.2.0pre1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/lib/substitute.c

    r1 r77  
    77   This program is free software; you can redistribute it and/or modify
    88   it under the terms of the GNU General Public License as published by
    9    the Free Software Foundation; either version 2 of the License, or
     9   the Free Software Foundation; either version 3 of the License, or
    1010   (at your option) any later version.
    1111   
     
    1616   
    1717   You should have received a copy of the GNU General Public License
    18    along with this program; if not, write to the Free Software
    19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    2019*/
    2120
     
    142141}
    143142
    144 char* sub_get_smb_name( void )
    145 {
    146         return smb_user_name;
    147 }
    148 
    149143/*******************************************************************
    150144 Setup the strings used by substitutions. Called per packet. Ensure
     
    156150        current_user_info = *pcui;
    157151        /* The following is safe as current_user_info.smb_name
    158          * has already been sanitised in register_vuid. */
     152         * has already been sanitised in register_existing_vuid. */
    159153        fstrcpy(smb_user_name, current_user_info.smb_name);
    160154}
     
    265259};
    266260
    267 struct api_longvar longvar_table[] = {
     261static struct api_longvar longvar_table[] = {
    268262        { "DomainSID",          longvar_domainsid },
    269263        { NULL,                 NULL }
     
    341335static char *automount_path(const char *user_name)
    342336{
    343         static pstring server_path;
     337        pstring server_path;
    344338
    345339        /* use the passwd entry as the default */
     
    370364        DEBUG(4,("Home server path: %s\n", server_path));
    371365
    372         return server_path;
     366        return talloc_strdup(talloc_tos(), server_path);
    373367}
    374368
     
    381375static const char *automount_server(const char *user_name)
    382376{
    383         static pstring server_name;
     377        pstring server_name;
    384378        const char *local_machine_name = get_local_machine_name();
    385379
     
    407401        DEBUG(4,("Home server: %s\n", server_name));
    408402
    409         return server_name;
     403        return talloc_strdup(talloc_tos(), server_name);
    410404}
    411405
     
    454448{
    455449        char *b, *p, *s, *r, *a_string;
    456         fstring pidstr;
     450        fstring pidstr, vnnstr;
    457451        struct passwd *pass;
    458452        const char *local_machine_name = get_local_machine_name();
     
    552546                case '(':
    553547                        a_string = realloc_expand_longvar( a_string, p );
     548                        break;
     549                case 'V' :
     550                        slprintf(vnnstr,sizeof(vnnstr)-1, "%u", get_my_vnn());
     551                        a_string = realloc_string_sub(a_string, "%V", vnnstr);
    554552                        break;
    555553                default:
Note: See TracChangeset for help on using the changeset viewer.