Kaspersky support is real crap

We have in the office a pack of 10 licenses for Kaspersky Internet Security (KIS).

Since we suspect a serial number leak, we asked Kaspersky support to generate for us a new key and make the old one invalid. Guess what we are waiting 1 month already for answer, any answer.

The ticket is in status: "Waiting for reply from global support team"

I really hate such crappy support.

Conclusion: Kapspersky support sucks (sux )

CD/DVD tray LOCK/UNLOCK under Linux


LOCK/UNLOCK your CD/DVD under Linux

==== UPDATE ====

UPDATE: As you can see in the comments, one reader suggested using eject utility:

Lock the drive: eject -i 1
Unlock the drive: eject -i 0

The option was not available when coded the below program. 

This works perfectly for me.
==============


==== UPDATE ====
It looks like when the time passes by, the things get changed
The below program stopped working after some changes in udev rules.
In order to make it work again you have to grab control over your eject button from udevd

comment the following line:
ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $tempnode", GOTO="cdrom_end"
in /lib/udev/rules.d/60-cdrom_id.rules,
restart udev

voila, the program is working again.

============================

When I am home, my kid is playing with my laptop DVD and tries to grab the tray and take it away :).

As you can imagine I am not very happy with this and wanted to find a program to lock the tray but unfortunately did not find any usable.

I found one but it is for Windows, and it costs money. Come on guys you want 15 US$ for 10 rows of code. This is a robbery.

Besides that I am working under Linux and this programs is no good to me.

I am not a programmer but since I was unable to find a suitable program I wrote one.

It is tested under Linux (Fedora 11 if that matters at all).

How to compile:

gcc -o cd-dvd-lock cd-dvd-lock.c

Usage ./cd-dvd-lock lock|unlock

Depending on the parameter it either locks or unlock the tray.

Copy the source below and save it in file called cd-dvd-lock.c



------------ COPY BELOW THIS LINE------------

/*
* cd-dvd-lock.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* The initial developer of the original code is Deyan T. Chepishev
* http://www.poweradded.net/
*
* (C) 2009             Deyan T. Chepishev
*/

/*
*
* The CD/DVD device is expected to be /dev/cdrom. This is
* usually a symlink to the real device. If you dont want to create a symlink
* just edit the path in the code and point it to your CD/DVD device.
*
*/

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/cdrom.h>
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <sys/ioctl.h>

void usage( char a[] );

int main(int argc, char *argv[]){

//The location of cd/dvd device. Edit this if necessary
char device[]="/dev/cdrom";

int fd,lock=9999;


// Set unbuffered output
setvbuf(stdout, NULL, _IONBF, 0);

if( 2 != argc ){
 usage(argv[0]);
 exit(1);
}

if (0 == strcasecmp(argv[1],"lock")){
 lock=1;
}

if(0 == strcasecmp(argv[1],"unlock")){
 lock=0;
}

if( (0!=lock) && (1!=lock) ){
 usage(argv[0]);
 exit(1);
}

if (-1 == (fd=open(device,O_RDWR|O_NONBLOCK))){
 printf("Error opening device: \"%s\", ",device);
        perror("");
       exit(1);
}
if (0 != ioctl(fd, CDROM_LOCKDOOR,lock)){
 printf("Error locking device: \"%s\", ",device);
        perror("");
        exit(1);
}
}

void usage( char a[] ){
printf("\n\nUsage %s [lock|unlock]\n\n", a);
}


------------ COPY ENDS ABOWE THIS LINE------------