

            getvdn (2) --- return name of file in user's variables directory  01/07/83


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 subroutine getvdn (filename, pathname [, username])
                 character filename (ARB), pathname (ARB), username (ARB)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Getvdn'  is used to return the full pathname of a file in a
                 user's shell variables storage directory.   Such  files  are
                 often  used  for  small  amounts of data that must be secure
                 (e.g.  mail files, encryption parameters,  shell  variables,
                 etc.).

                 The 'filename' argument is an EOS-terminated string contain-
                 ing  the  simple  name of a file in the variables directory.
                 The 'pathname' argument receives the full  pathname  of  the
                 given  file.  The 'username' argument, if present, specifies
                 the particular user  whose  variables  directory  is  to  be
                 referenced.   If  'username'  is missing, or is equal to the
                 user making the call to 'getvdn', then the user's  Subsystem
                 password is inserted in the returned pathname, allowing full
                 owner rights in the variables directory.

                 An  example:   If the current user's login name is "foo" and
                 his Subsystem password is "bar", then the call
                      call getvdn (".vars"s, pathname)
                 would return the  string  "=vars=/foo:bar/.vars"  in  'path-
                 name'.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Getvdn'  calls 'ctoc' to start the pathname with the string
                 "=vars=/", then simply uses  'scopy'  to  append  the  other
                 items  of  information as needed.  The Subsystem password is
                 available in the variable 'Passwd'  in  the  shell's  common
                 areas.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 pathname


            _C_a_l_l_s

                 ctoc, date, equal, length, scopy, Primos missin


            _B_u_g_s

                 Security  of  the  variables  directory  can  be broken by a
                 Trojan horse.


            getvdn (2)                    - 1 -                    getvdn (2)




            getvdn (2) --- return name of file in user's variables directory  01/07/83


            _S_e_e _A_l_s_o

                 vfyusr (2), expand (2), lutemp (6)























































            getvdn (2)                    - 2 -                    getvdn (2)


