Recently started using vi macros. When attempting to use one which accessed the external shell, got the following message: "The ! command is not supported when the secure edit option is set." When attempting to ":set nosecure" got: "set: the secure option may not be turned off." When attempting to "set nosecure" in my .exrc file, got: set nonumber .exrc, 44: set: the secure option may not be turned off .exrc, 44: Ex command failed: pending commands discarded Looking through all the man pages, vi references, tutorials, and the the oreilly vi "bible", can't find anything... Is "set secure" a compiled in setting?>From FreeBSD vi man page:-S Run with the secure edit option set, disallowing all access to external programs. and secure [off] Turns off all access to external programs. ..william.o.yates...hackware.at.tru2life.net...tru2life.info...
On 4/20/08, William O. Yates <hackware@tru2life.net> wrote:> Recently started using vi macros. > > When attempting to use one which accessed the external shell, got the following message: > > "The ! command is not supported when the secure edit option is set." >Are you running vi as root? I believe that will automatically set secure mode. -Ben Kaduk
On 20/Apr/2008 13:32 Ben Kaduk wrote ..> On 4/20/08, William O. Yates <hackware@tru2life.net> wrote: > > Recently started using vi macros. > > > > When attempting to use one which accessed the external shell, got the following > message: > > > > "The ! command is not supported when the secure edit option is set." > > > > Are you running vi as root? I believe that will automatically set secure mode. > > -Ben KadukYes, running as root (toor actually)... ns1:/usr/local/interchange/catalogs/store> uname -a FreeBSD ns1.tru2life.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 ns1:/usr/local/interchange/catalogs/store> ..william.o.yates...hackware.at.tru2life.net...tru2life.info...
Does one of the following files enables secure mode? /etc/vi.exrc $HOME/.nexrc $HOME/.exrc .nexrc .exrc Those are the vi-startup files (as stated by the manpage) -- Jille William O. Yates schreef:> On 20/Apr/2008 13:32 Ben Kaduk wrote .. > >> On 4/20/08, William O. Yates <hackware@tru2life.net> wrote: >> >>> Recently started using vi macros. >>> >>> When attempting to use one which accessed the external shell, got the following >>> >> message: >> >>> "The ! command is not supported when the secure edit option is set." >>> >>> >> Are you running vi as root? I believe that will automatically set secure mode. >> >> -Ben Kaduk >> > > Yes, running as root (toor actually)... > > ns1:/usr/local/interchange/catalogs/store> uname -a > FreeBSD ns1.tru2life.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 > ns1:/usr/local/interchange/catalogs/store> > > ..william.o.yates...hackware.at.tru2life.net...tru2life.info... > > _______________________________________________ > freebsd-security@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org" >
At 01:57 PM 4/20/2008, William O. Yates wrote:>Recently started using vi macros. > >When attempting to use one which accessed the external shell, got the >following message: > >"The ! command is not supported when the secure edit option is set." > >When attempting to ":set nosecure" got: > >"set: the secure option may not be turned off." > >When attempting to "set nosecure" in my .exrc file, got: > >set nonumber >.exrc, 44: set: the secure option may not be turned off >.exrc, 44: Ex command failed: pending commands discarded > >Looking through all the man pages, vi references, tutorials, and the the >oreilly vi "bible", >can't find anything... > >Is "set secure" a compiled in setting? > > >From FreeBSD vi man page: > > -S Run with the secure edit option set, disallowing all > access to > external programs. >and > secure [off] > Turns off all access to external programs. > >..william.o.yates...hackware.at.tru2life.net...tru2life.info...So you are using ! for external commands and not the like :w! I would look at any defaults on the system that may be causing vi to run in secure mode, also check the mounted filesystem you are on is set to noexec. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.