Sponsored Content
Full Discussion: ksh read bug in HPUX 11i
Top Forums UNIX for Advanced & Expert Users ksh read bug in HPUX 11i Post 302106994 by Jackaroe on Tuesday 13th of February 2007 06:30:41 PM
Old 02-13-2007
ksh read bug in HPUX 11i

Is this a bug in ksh on HPUX 11i or is read impromperly documented?

INPUT

Thu Jan 18 09:14:52 PST [server: vscan.virus.detected:error]: CIFS: Virus Detected - File ONTAP_ADMIN$\vol\vol0\DDD\Ventana\Strattoni\Race Stuff\Rumor.exe in share DDD accessed by client CLIENT (111.11.11.111) running as user USER is infected. The filer received status message Virus JOKE_SMALLPEN Found! and error code [3e8] from vscan (anti-virus) server 222.22.22.22.

#! /bin/ksh
exec 4< $INPUT
read -r -u4 ALERT
print $ALERT

OUTPUT

Thu Jan 18 09:14:52 PST [server: vscan.virus.detected:error]: CIFS: Virus Detected - File ONTAP_ADMIN$ ol ol0\DDD\Ventana\Strattoni\Race Stuff\Rumor.exe in share DDD accessed by client CLIENT (111.11.11.111) running as user USER is infected. The filer received status message Virus JOKE_SMALLPEN Found! and error code [3e8] from vscan (anti-virus) server 222.22.22.22.


The literal \v in the file path have been translated into ^K. (This can be seen in vi but isn't printable here).

It appears that read -r is interpreting \v in the file path as vertical tab control character...

Is this a bug or what?
 

9 More Discussions You Might Find Interesting

1. HP-UX

is nedit available in hpux 11i version 2?

hi 1).in the command "set" result, the 2nd line is EDITOR=vi is it means the vi editor is the default editor? 2). is "nedit"editor available in hpux 11iv2? if no how to install or work in nedit in hpux 11i? (0 Replies)
Discussion started by: sekar sundaram
0 Replies

2. Shell Programming and Scripting

ksh [ HP True 64 v5.1 ] and HP-UX B.11.11i

Hi Friends, We have migrated our Unix from HP True 64 v5.1 to HP-UX B.11.11i recently and copied all my shell scripts ( Korn shell ) to new HP-UX B.11.11i unix machine. I've encountered lot of errors during execution of the scripts for example: cat x.sh #!/usr/bin/ksh if then echo... (3 Replies)
Discussion started by: krishna
3 Replies

3. HP-UX

backspace deletion hpux 11i

how i can enable backspace or charector deletion in hpux11i shell prompt. (12 Replies)
Discussion started by: jestinabel
12 Replies

4. HP-UX

pstat_getdisk() call doesn’t work properly in HPUX 11.31 (11i V3)

As per the man page, pstat_getdisk() call returns the number of instances, which could be 0 upon successful completion, otherwise a value of -1 is returned. Please have a look at this sample program -> #include <stdio.h> #include <sys/pstat.h> int main() { int j = 0, ret; struct... (2 Replies)
Discussion started by: sandiworld
2 Replies

5. HP-UX

minimum hardware requirement for HPUX 11i V3

I am new for HPUX OS and want to pursue my career in HPUX Administration. I could not able to get following information from HP.com site, that why I need an assistance to know that - can I install HPUX 11i V3 OS on old HP B2000 & B1000 workstations (these workstation are 4 to 5 year old) or not,... (5 Replies)
Discussion started by: girish.batra
5 Replies

6. Shell Programming and Scripting

recent test -e ksh incompatibility in hpux?

On a very new (11.31) hpux machine, I can no longer execute shell fragements like: if ; then . .profile.foo fi and get "ksh: test: argument expected" if I convert this to -d or -f as appropriate (which I've not had to do on older versions of hpux (11.23) nor any other unix platform... (9 Replies)
Discussion started by: Peeter Joot
9 Replies

7. HP-UX

HPUX KSH for loop issues.

Wrote a KSH script on a RHEL server and moved it over to the HPUX server and it is not liking a loop that I put together. Here is the simple form of it that does not work in KSH: for x in {0..$VARIABLE_NAME} do echo $x done This works: for x in {0..10} do echo $x ... (3 Replies)
Discussion started by: jake0391
3 Replies

8. Shell Programming and Scripting

How to convert string(variable) into date( epoch) in ksh on HPUX machine?

Hi all, I have used a bash script which ultimately converts a string into date using date --date option: DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime Please use code tags... (7 Replies)
Discussion started by: Rashu123
7 Replies

9. UNIX for Advanced & Expert Users

ksh bug?

I think I discovered a bug in ksh. $ cat test.sh x=`echo hello | cat 2>&1 >/dev/null` echo $x y=`echo hello | cat >/dev/null 2>&1` echo $y works with all shells, including ksh in normal mode. But does not work with ksh -x: $ ksh -x test.sh + + echo hello + cat + 2>& 1 x=1> /dev/null +... (11 Replies)
Discussion started by: MadeInGermany
11 Replies
VFS_SCANNEDONLY(8)					    System Administration tools 					VFS_SCANNEDONLY(8)

NAME
vfs_scannedonly - Ensures that only files that have been scanned for viruses are visible and accessible to the end user. SYNOPSIS
vfs objects = scannedonly DESCRIPTION
This VFS module is part of the samba(8) suite. The vfs_scannedonly VFS module ensures that only files that have been scanned for viruses are visible and accessible to the end user. If non-scanned files are found an anti-virus scanning daemon is notified. The anti-virus scanning daemon is not part of the Samba suite. Scannedonly comes in two parts: a samba vfs module and (one or more) daemons. The daemon scans files. If a certain file is clean, a second file is created with prefix .scanned:. The Samba module simply looks if such a .scanned: file exists, and is newer than the pertinent file. If this is the case, the file is shown to the user. If this is not the case, the file is not returned in a directory listing (configurable), and cannot be opened (configurable). The Samba vfs module will notify the daemon to scan this file. So what happens for the user in the default configuration. The first time a directory is listed, it shows files as 'file is being scanned for viruses, but after the first time all files are shown. There is a utility scannedonly_prescan that can help you to prescan all directories. When new files are written the daemon is notified immediately after the file is complete. If a virus is found by the daemon, a file with a warning message is created in the directory of the user, a warning is sent to the logs, and the file is renamed to have prefix .virus:. Files with the .virus: prefix are never shown to the user and all access is denied. This module is stackable. CONFIGURATION
vfs_scannedonly relies on a anti-virus scanning daemon that listens on the scannedonly socket (unix domain socket or UDP socket). OPTIONS
scannedonly:domain_socket = True Whether to use a unix domain socket or not (false reverts to use udp) scannedonly:socketname = /var/lib/scannedonly/scan The location of the unix domain socket to connect to scannedonly:portnum = 2020 The udp port number to connect to scannedonly:scanhost = localhost When using UDP the host that runs the scanning daemon (this host needs access to the files!) scannedonly:show_special_files = True Whether sockets, devices and fifo's (all not scanned for viruses) should be visible to the user scannedonly:rm_hidden_files_on_rmdir = True Whether files that are not visible (.scanned: files, .failed: files and .virus: files) should be deleted if the user tries to remove the directory. If false, the user will get the "directory is not empty" error. scannedonly:hide_nonscanned_files = True If false, all non-scanned files are visible in directory listings. If such files are found in a directory listing the scanning daemon is notified that scanning is required. Access to non-scanned files is still denied (see scannedonly:allow_nonscanned_files). scannedonly:scanning_message = is being scanned for viruses If non-scanned files are hidden (if scannedonly:hide_nonscanned_files = True), a fake 0 byte file is shown. The filename is the original filename with the message as suffix. scannedonly:recheck_time_open = 50 If a non-scanned file is opened, the vfs module will wait recheck_tries_open times for recheck_time_open milliseconds for the scanning daemon to create a .scanned: file. For small files that are scanned by the daemon within the time (tries * time) the behavior will be just like on-access scanning. scannedonly:recheck_tries_open = 100 See recheck_time_open. scannedonly:recheck_time_readdir = 50 If a non-scanned file is in a directory listing the vfs module notifies the daemon (once for all files that need scanning in that directory), and waits recheck_tries_readdir times for recheck_time_readdir milliseconds. Only used when hide_nonscanned_files is false. scannedonly:recheck_tries_readdir = 20 See recheck_time_readdir. scannedonly:allow_nonscanned_files = False Allow access to non-scanned files. The daemon is notified, however, and special files such as .scanned: files. .virus: files and .failed: files are not listed. EXAMPLES
Enable anti-virus scanning: [homes] vfs objects = scannedonly scannedonly:hide_nonscanned_files = False CAVEATS
This is not true on-access scanning. However, it is very fast for files that have been scanned already. VERSION
This man page is correct for version 3.5.0 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Scannedonly was developed for Samba by Olivier Sessink. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Samba 3.5 06/18/2010 VFS_SCANNEDONLY(8)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy