1- /* $OpenBSD: sftp.c,v 1.235 2023/09/08 05:56:13 djm Exp $ */
1+ /* $OpenBSD: sftp.c,v 1.236 2023/09/10 23:12:32 djm Exp $ */
22/*
33 * Copyright (c) 2001-2004 Damien Miller <[email protected] > 44 *
@@ -110,7 +110,7 @@ struct complete_ctx {
110110 char * * remote_pathp ;
111111};
112112
113- int remote_glob (struct sftp_conn * , const char * , int ,
113+ int sftp_glob (struct sftp_conn * , const char * , int ,
114114 int (* )(const char * , int ), glob_t * ); /* proto for sftp-glob.c */
115115
116116extern char * __progname ;
@@ -655,7 +655,7 @@ process_get(struct sftp_conn *conn, const char *src, const char *dst,
655655 memset (& g , 0 , sizeof (g ));
656656
657657 debug3 ("Looking up %s" , abs_src );
658- if ((r = remote_glob (conn , abs_src , GLOB_MARK , NULL , & g )) != 0 ) {
658+ if ((r = sftp_glob (conn , abs_src , GLOB_MARK , NULL , & g )) != 0 ) {
659659 if (r == GLOB_NOSPACE ) {
660660 error ("Too many matches for \"%s\"." , abs_src );
661661 } else {
@@ -977,7 +977,7 @@ do_globbed_ls(struct sftp_conn *conn, const char *path,
977977
978978 memset (& g , 0 , sizeof (g ));
979979
980- if ((r = remote_glob (conn , path ,
980+ if ((r = sftp_glob (conn , path ,
981981 GLOB_MARK |GLOB_NOCHECK |GLOB_BRACE |GLOB_KEEPSTAT |GLOB_NOSORT ,
982982 NULL , & g )) != 0 ||
983983 (g .gl_pathc && !g .gl_matchc )) {
@@ -1618,7 +1618,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
16181618 break ;
16191619 case I_RM :
16201620 path1 = make_absolute_pwd_glob (path1 , * pwd );
1621- remote_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
1621+ sftp_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
16221622 for (i = 0 ; g .gl_pathv [i ] && !interrupted ; i ++ ) {
16231623 if (!quiet )
16241624 mprintf ("Removing %s\n" , g .gl_pathv [i ]);
@@ -1722,7 +1722,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
17221722 attrib_clear (& a );
17231723 a .flags |= SSH2_FILEXFER_ATTR_PERMISSIONS ;
17241724 a .perm = n_arg ;
1725- remote_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
1725+ sftp_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
17261726 for (i = 0 ; g .gl_pathv [i ] && !interrupted ; i ++ ) {
17271727 if (!quiet )
17281728 mprintf ("Changing mode on %s\n" ,
@@ -1736,7 +1736,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
17361736 case I_CHOWN :
17371737 case I_CHGRP :
17381738 path1 = make_absolute_pwd_glob (path1 , * pwd );
1739- remote_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
1739+ sftp_glob (conn , path1 , GLOB_NOCHECK , NULL , & g );
17401740 for (i = 0 ; g .gl_pathv [i ] && !interrupted ; i ++ ) {
17411741 if ((hflag ? sftp_lstat : sftp_stat )(conn ,
17421742 g .gl_pathv [i ], 0 , & aa ) != 0 ) {
@@ -2017,7 +2017,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
20172017 memset (& g , 0 , sizeof (g ));
20182018 if (remote != LOCAL ) {
20192019 tmp = make_absolute_pwd_glob (tmp , remote_path );
2020- remote_glob (conn , tmp , GLOB_DOOFFS |GLOB_MARK , NULL , & g );
2020+ sftp_glob (conn , tmp , GLOB_DOOFFS |GLOB_MARK , NULL , & g );
20212021 } else
20222022 (void )glob (tmp , GLOB_DOOFFS |GLOB_MARK , NULL , & g );
20232023
0 commit comments